[med-svn] [consensuscore2] 04/05: Allow setup.py to work with both Python 2.x and 3.x

Afif Elghraoui afif at moszumanska.debian.org
Sun Jul 24 07:22:20 UTC 2016


This is an automated email from the git hooks/post-receive script.

afif pushed a commit to branch master
in repository consensuscore2.

commit 1b8c11fcd2af5a098333aa0d7b09f33421fe8a08
Author: Afif Elghraoui <afif at debian.org>
Date:   Sat Jul 23 22:08:16 2016 -0700

    Allow setup.py to work with both Python 2.x and 3.x
    
    Closes: #829622
---
 debian/control           |  2 ++
 debian/patches/py3.patch | 24 ++++++++++++++++++++++++
 debian/patches/series    |  1 +
 3 files changed, 27 insertions(+)

diff --git a/debian/control b/debian/control
index 787802a..29db8ed 100644
--- a/debian/control
+++ b/debian/control
@@ -14,11 +14,13 @@ Build-Depends:
 	python-all,
 	python-all-dev,
 	python-setuptools,
+	python-six,
 	python-numpy (>= 1.6.0),
 # Python3
 	python3-all,
 	python3-all-dev,
 	python3-setuptools,
+	python3-six,
 	python3-numpy (>= 1.6.0),
 Standards-Version: 3.9.8
 Homepage: https://github.com/PacificBiosciences/ConsensusCore2
diff --git a/debian/patches/py3.patch b/debian/patches/py3.patch
new file mode 100644
index 0000000..4b8f501
--- /dev/null
+++ b/debian/patches/py3.patch
@@ -0,0 +1,24 @@
+Description: Allow setup.py to work with both Python 2 and 3
+Author: Afif Elghraoui <afif at debian.org>
+Forwarded: no
+Last-Update: 2016-07-23
+
+--- consensuscore2.orig/setup.py
++++ consensuscore2/setup.py
+@@ -5,6 +5,7 @@
+ import os.path
+ import sys
+ 
++from six import iteritems
+ from copy import copy
+ from distutils import sysconfig
+ from distutils.command.clean import clean as dclean
+@@ -109,7 +110,7 @@
+         configure = copy(self.configure)
+         if self.generator:
+             configure.append("-G{0}".format(self.generator))
+-        for k, v in self.definitions.iteritems():
++        for k, v in iteritems(self.definitions):
+             configure.append("-D{0}={1}".format(k, v))
+         configure.append(directory)
+         print("Configuring with command `{0}`".format(" ".join(configure)), file=sys.stderr)
diff --git a/debian/patches/series b/debian/patches/series
index 5879227..db9862c 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
 build.patch
+py3.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/consensuscore2.git



More information about the debian-med-commit mailing list