summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Orlitzky <mjo@gentoo.org>2018-03-25 10:27:57 -0400
committerMichael Orlitzky <mjo@gentoo.org>2018-03-25 10:30:13 -0400
commit4d1fb37992ef3d6cbe0cd4ed63d4b796428ccbd4 (patch)
treec7c4369805ca75b0497f0374c43ced4ae6b1fbb2 /dev-python
parentapp-office/gnucash: Remove Security Susceptible (diff)
downloadgentoo-4d1fb37992ef3d6cbe0cd4ed63d4b796428ccbd4.tar.gz
gentoo-4d1fb37992ef3d6cbe0cd4ed63d4b796428ccbd4.tar.bz2
gentoo-4d1fb37992ef3d6cbe0cd4ed63d4b796428ccbd4.zip
dev-python/pyzor: add another patch to keep 2to3 from breaking things.
The pyzor-1.0.0 build system still runs 2to3 and that's breaking the (now-patched) client, because it was patched to support python-3.x already. This commit adds another patch that should prevent 2to3 from breaking the client by giving it something to fix. Bug: https://bugs.gentoo.org/643692 Package-Manager: Portage-2.3.24, Repoman-2.3.6
Diffstat (limited to 'dev-python')
-rw-r--r--dev-python/pyzor/files/unfix-configparser-compat-for-2to3.patch41
-rw-r--r--dev-python/pyzor/pyzor-1.0.0-r1.ebuild5
2 files changed, 45 insertions, 1 deletions
diff --git a/dev-python/pyzor/files/unfix-configparser-compat-for-2to3.patch b/dev-python/pyzor/files/unfix-configparser-compat-for-2to3.patch
new file mode 100644
index 000000000000..93d0f07a2579
--- /dev/null
+++ b/dev-python/pyzor/files/unfix-configparser-compat-for-2to3.patch
@@ -0,0 +1,41 @@
+From e4f06e21f697b863fa45a50e535ff0c6e3621a60 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 25 Mar 2018 10:14:21 -0400
+Subject: [PATCH 1/1] scripts/pyzor: undo ConfigParser python-3.x
+ compatibility.
+
+The build system for pyzor-1.0.0 still runs the 2to3 utility on the
+scripts to be installed. As an unintended side-effect, the python-3.x
+"try... import... except" compatibility block for the ConfigParser <->
+configparser module gets modified (the module name gets mistakenly
+lowercased).
+
+This commit puts back the python-2.x "import ConfigParser" line
+unconditionally, and we'll have to rely on 2to3 to fix it when run
+under python-3.x. In newer versions of pyzor, the automatic 2to3 will
+not happen.
+
+Bug: https://bugs.gentoo.org/643692
+---
+ scripts/pyzor | 5 +----
+ 1 file changed, 1 insertion(+), 4 deletions(-)
+
+diff --git a/scripts/pyzor b/scripts/pyzor
+index 86c6f7d..2750d92 100755
+--- a/scripts/pyzor
++++ b/scripts/pyzor
+@@ -16,10 +16,7 @@ import optparse
+ import tempfile
+ import threading
+
+-try:
+- import configparser as ConfigParser
+-except ImportError:
+- import ConfigParser
++import ConfigParser
+
+ import pyzor.digest
+ import pyzor.client
+--
+2.16.1
+
diff --git a/dev-python/pyzor/pyzor-1.0.0-r1.ebuild b/dev-python/pyzor/pyzor-1.0.0-r1.ebuild
index 14e1ee840724..ce7d0e7b5cf1 100644
--- a/dev-python/pyzor/pyzor-1.0.0-r1.ebuild
+++ b/dev-python/pyzor/pyzor-1.0.0-r1.ebuild
@@ -39,7 +39,10 @@ REQUIRED_USE="pyzord? ( || ( gdbm mysql redis ) )
test? ( gdbm mysql redis )"
S="${WORKDIR}/${PN}-release-${MY_PV}"
-PATCHES=( "${FILESDIR}/read-stdin-as-binary-in-get_input_msg.patch" )
+PATCHES=(
+ "${FILESDIR}/read-stdin-as-binary-in-get_input_msg.patch"
+ "${FILESDIR}/unfix-configparser-compat-for-2to3.patch"
+)
python_test() {
# The suite is py2 friendly only