summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Junghans <junghans@gentoo.org>2018-09-22 07:05:35 -0600
committerChristoph Junghans <junghans@gentoo.org>2018-09-22 07:06:24 -0600
commitf7cda0a8974873c0e916752c62bc99af1fd75aeb (patch)
treee517bbcc52f4a928e711a071c5671308e3048c87
parentnet-libs/nodejs: Version 10.11.0. (diff)
downloadgentoo-f7cda0a8974873c0e916752c62bc99af1fd75aeb.tar.gz
gentoo-f7cda0a8974873c0e916752c62bc99af1fd75aeb.tar.bz2
gentoo-f7cda0a8974873c0e916752c62bc99af1fd75aeb.zip
dev-python/citeproc-py: fix build with python3
Closes: https://bugs.gentoo.org/659520 Package-Manager: Portage-2.3.49, Repoman-2.3.10
-rw-r--r--dev-python/citeproc-py/citeproc-py-0.4.0.ebuild2
-rw-r--r--dev-python/citeproc-py/files/b1a5f925527093b0b5c11507f379a908e3354820.patch42
2 files changed, 44 insertions, 0 deletions
diff --git a/dev-python/citeproc-py/citeproc-py-0.4.0.ebuild b/dev-python/citeproc-py/citeproc-py-0.4.0.ebuild
index 47823b83524..56f3fc4dce8 100644
--- a/dev-python/citeproc-py/citeproc-py-0.4.0.ebuild
+++ b/dev-python/citeproc-py/citeproc-py-0.4.0.ebuild
@@ -15,6 +15,8 @@ SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE=""
+PATCHES=( "${FILESDIR}/b1a5f925527093b0b5c11507f379a908e3354820.patch" )
+
DEPEND="
dev-python/rnc2rng[${PYTHON_USEDEP}]
dev-python/lxml[${PYTHON_USEDEP}]"
diff --git a/dev-python/citeproc-py/files/b1a5f925527093b0b5c11507f379a908e3354820.patch b/dev-python/citeproc-py/files/b1a5f925527093b0b5c11507f379a908e3354820.patch
new file mode 100644
index 00000000000..b3b6e0fe074
--- /dev/null
+++ b/dev-python/citeproc-py/files/b1a5f925527093b0b5c11507f379a908e3354820.patch
@@ -0,0 +1,42 @@
+From b1a5f925527093b0b5c11507f379a908e3354820 Mon Sep 17 00:00:00 2001
+From: Brecht Machiels <brecht@mos6581.org>
+Date: Tue, 22 May 2018 12:57:47 +0200
+Subject: [PATCH] rnc2rng 2.6.1 handles rnc file encoding (fixes #81)
+
+---
+ setup.py | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/setup.py b/setup.py
+index dbaad6d..774932b 100755
+--- a/setup.py
++++ b/setup.py
+@@ -9,6 +9,7 @@
+ import sys
+
+ from datetime import datetime
++from io import open
+ from subprocess import Popen, PIPE
+ from setuptools import setup, find_packages
+ from setuptools.command.build_py import build_py
+@@ -63,9 +64,8 @@ def convert_rnc():
+ import rnc2rng
+
+ filename_root, _ = os.path.splitext(CSL_SCHEMA_RNC)
+- with open(CSL_SCHEMA_RNC, 'r') as rnc:
+- root = rnc2rng.load(rnc)
+- with open(filename_root + '.rng', 'w') as rng:
++ root = rnc2rng.load(CSL_SCHEMA_RNC)
++ with open(filename_root + '.rng', 'w', encoding='utf-8') as rng:
+ rnc2rng.dump(root, rng)
+
+
+@@ -91,7 +91,7 @@ def run(self):
+ 'data/schema/*.rng',
+ 'data/styles/*.csl']},
+ scripts=['bin/csl_unsorted'],
+- setup_requires=['rnc2rng>=2.2'],
++ setup_requires=['rnc2rng>=2.6.1'],
+ install_requires=['lxml'],
+ provides=[PACKAGE],
+ #test_suite='nose.collector',