dev-python/pygments: Fix byte decoding in py3
authorJustin Lecher <jlec@gentoo.org>
Fri, 4 Dec 2015 08:34:28 +0000 (09:34 +0100)
committerJustin Lecher <jlec@gentoo.org>
Fri, 4 Dec 2015 08:34:28 +0000 (09:34 +0100)
Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=564478

Package-Manager: portage-2.2.25
Signed-off-by: Justin Lecher <jlec@gentoo.org>
dev-python/pygments/files/2.0.2-bytes-decode.patch [new file with mode: 0644]
dev-python/pygments/pygments-2.0.2-r2.ebuild [moved from dev-python/pygments/pygments-2.0.2-r1.ebuild with 97% similarity]

diff --git a/dev-python/pygments/files/2.0.2-bytes-decode.patch b/dev-python/pygments/files/2.0.2-bytes-decode.patch
new file mode 100644 (file)
index 0000000..35f2e26
--- /dev/null
@@ -0,0 +1,16 @@
+ pygments/formatters/img.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/pygments/formatters/img.py b/pygments/formatters/img.py
+index db5bee3..12d53cd 100644
+--- a/pygments/formatters/img.py
++++ b/pygments/formatters/img.py
+@@ -84,7 +84,7 @@ class FontManager(object):
+         if not exit:
+             lines = out.splitlines()
+             if lines:
+-                path = lines[0].strip().strip(':')
++                path = lines[0].decode().strip().strip(':')
+                 return path
+ 
+     def _create_nix(self):
similarity index 97%
rename from dev-python/pygments/pygments-2.0.2-r1.ebuild
rename to dev-python/pygments/pygments-2.0.2-r2.ebuild
index b2de0150b71c4c3aa9390ebc5788ea484e55c258..adef7afa90f1650fcf2353697bbb41577c7c118c 100644 (file)
@@ -36,6 +36,7 @@ S="${WORKDIR}/${MY_P}"
 PATCHES=(
        "${FILESDIR}"/${PV}-shell-injection-backport.patch
        "${FILESDIR}"/${PV}-shell-injection-backport2.patch
+       "${FILESDIR}"/${PV}-bytes-decode.patch
 )
 
 python_compile_all() {