summaryrefslogtreecommitdiff
blob: fc90ffef7f34c16b92f3363ac317994aea574bcd (plain)
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
49
50
51
52
From: Ole Streicher <ole@aip.de>
Date: Fri, 21 Apr 2017 13:40:06 +0200
Subject: Use external xpa

---
 setup.py | 15 +++------------
 1 file changed, 3 insertions(+), 12 deletions(-)

diff --git a/setup.py b/setup.py
index f0dd5d5..f291201 100644
--- a/setup.py
+++ b/setup.py
@@ -121,24 +121,20 @@ if not sys.platform.startswith('win'):
                    xpaio.c
                    """.split()
 
-    XPA_SOURCES = [os.path.join(XPALIB_DIR, c) for c in XPA_FILES]
-    XPALIB_DEFINES = [("HAVE_CONFIG_H", "1")]
+    XPA_SOURCES = []
+    XPALIB_DEFINES = []
     XPA_SOURCES.append(CYTHON_SOURCE)
 
     xpa_module = Extension("xpa",
                            sources=XPA_SOURCES,
-                           include_dirs=[XPALIB_DIR],
                            define_macros=XPALIB_DEFINES,
-                           depends=[CONF_H_NAME],
+                           libraries = ['xpa'],
                            )
     if use_cython:
         ext = cythonize(xpa_module)
 
         class my_clean(clean):
             def run(self):
-                import subprocess
-                subprocess.call(["make", "clean"],
-                                cwd=XPALIB_DIR)
                 if os.access(CONF_H_NAME, os.F_OK):
                     os.remove(CONF_H_NAME)
                 os.remove("wrappers/xpa.c")
@@ -147,11 +143,6 @@ if not sys.platform.startswith('win'):
 
         class build_ext_with_configure(build_ext):
             def build_extensions(self):
-                import subprocess
-                subprocess.call(["make", "-f", "Makefile", "clean"],
-                                cwd=XPALIB_DIR)
-                subprocess.call(["sh", "./configure"], cwd=XPALIB_DIR)
-                subprocess.call(["make", "-f", "Makefile"], cwd=XPALIB_DIR)
                 build_ext.build_extensions(self)
 
         cmdclass.update({'build_ext': build_ext_with_configure,