[med-svn] [python-skbio] 02/03: Add patch to use libssw in setup.py

Kevin Murray daube-guest at moszumanska.debian.org
Tue Nov 15 08:28:02 UTC 2016


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

daube-guest pushed a commit to branch master
in repository python-skbio.

commit 7ba4eb7483bf3c77700340d72e4813c0debe1a67
Author: Kevin Murray <spam at kdmurray.id.au>
Date:   Tue Nov 15 19:25:59 2016 +1100

    Add patch to use libssw in setup.py
---
 ...02-use-libsww-as-library-not-embedded-src.patch | 48 ++++++++++++++++++++++
 debian/patches/mathjax-path                        |  4 +-
 debian/patches/series                              |  1 +
 3 files changed, 51 insertions(+), 2 deletions(-)

diff --git a/debian/patches/0002-use-libsww-as-library-not-embedded-src.patch b/debian/patches/0002-use-libsww-as-library-not-embedded-src.patch
new file mode 100644
index 0000000..01518f5
--- /dev/null
+++ b/debian/patches/0002-use-libsww-as-library-not-embedded-src.patch
@@ -0,0 +1,48 @@
+From: Kevin Murray <spam at kdmurray.id.au>
+Date: Tue, 15 Nov 2016 19:21:24 +1100
+Subject: use libsww as library, not embedded src
+
+---
+ setup.py | 22 +++-------------------
+ 1 file changed, 3 insertions(+), 19 deletions(-)
+
+diff --git a/setup.py b/setup.py
+index 366e058..596323c 100644
+--- a/setup.py
++++ b/setup.py
+@@ -58,21 +58,6 @@ with open('README.rst') as f:
+ USE_CYTHON = os.environ.get('USE_CYTHON', False)
+ ext = '.pyx' if USE_CYTHON else '.c'
+ 
+-# There's a bug in some versions of Python 3.4 that propagates
+-# -Werror=declaration-after-statement to extensions, instead of just affecting
+-# the compilation of the interpreter. See http://bugs.python.org/issue21121 for
+-# details. This acts as a workaround until the next Python 3 release -- thanks
+-# Wolfgang Maier (wolma) for the workaround!
+-ssw_extra_compile_args = ['-Wno-error=declaration-after-statement']
+-if sys.platform == 'win32':
+-    ssw_extra_compile_args = []
+-
+-# Users with i686 architectures have reported that adding this flag allows
+-# SSW to be compiled. See https://github.com/biocore/scikit-bio/issues/409 and
+-# http://stackoverflow.com/q/26211814/3776794 for details.
+-if platform.machine() == 'i686':
+-    ssw_extra_compile_args.append('-msse2')
+-
+ extensions = [
+     Extension("skbio.metadata._intersection",
+               ["skbio/metadata/_intersection" + ext]),
+@@ -80,10 +65,9 @@ extensions = [
+               ["skbio/stats/__subsample" + ext],
+               include_dirs=[np.get_include()]),
+     Extension("skbio.alignment._ssw_wrapper",
+-              ["skbio/alignment/_ssw_wrapper" + ext,
+-               "skbio/alignment/_lib/ssw.c"],
+-              extra_compile_args=ssw_extra_compile_args,
+-              include_dirs=[np.get_include()]),
++              ["skbio/alignment/_ssw_wrapper" + ext],
++              include_dirs=[np.get_include()],
++              libraries=['ssw']),
+     Extension("skbio.diversity._phylogenetic",
+               ["skbio/diversity/_phylogenetic" + ext],
+               include_dirs=[np.get_include()])
diff --git a/debian/patches/mathjax-path b/debian/patches/mathjax-path
index 5f57571..eaa9570 100644
--- a/debian/patches/mathjax-path
+++ b/debian/patches/mathjax-path
@@ -7,10 +7,10 @@ Subject: Set mathjax path to debian's copy
  1 file changed, 2 insertions(+)
 
 diff --git a/doc/source/conf.py b/doc/source/conf.py
-index 3a5d9db..1621c9a 100644
+index 03e7774..a587142 100644
 --- a/doc/source/conf.py
 +++ b/doc/source/conf.py
-@@ -130,6 +130,8 @@ extensions = [
+@@ -134,6 +134,8 @@ extensions = [
      'sphinx.ext.intersphinx'
  ]
  
diff --git a/debian/patches/series b/debian/patches/series
index 1aaff26..fcc25dc 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
 mathjax-path
+0002-use-libsww-as-library-not-embedded-src.patch

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



More information about the debian-med-commit mailing list