File: 0002-use-libsww-as-library-not-embedded-src.patch

package info (click to toggle)
python-skbio 0.5.1-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 16,556 kB
  • ctags: 7,222
  • sloc: python: 42,085; ansic: 670; makefile: 180; sh: 10
file content (48 lines) | stat: -rw-r--r-- 2,032 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
From: Kevin Murray <spam@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()])