Browse Source

Many linux changes for python wrapper

iss7
Trevor Irons 4 years ago
parent
commit
0002dc957a
1 changed files with 11 additions and 1 deletions
  1. 11
    1
      python/setup.py

+ 11
- 1
python/setup.py View File

@@ -1,4 +1,5 @@
1 1
 from setuptools import setup, Extension, find_packages
2
+from setuptools.command.install import install
2 3
 from setuptools.dist import Distribution
3 4
 import sys
4 5
 
@@ -7,9 +8,17 @@ if sys.version_info < (3,0):
7 8
 
8 9
 class BinaryDistribution(Distribution):
9 10
     """Distribution which always forces a binary package with platform name"""
10
-    def has_ext_modules(foo):
11
+    def is_pure(self):
12
+        return False
13
+    def has_ext_modules(self):
11 14
         return True
12 15
 
16
+class InstallPlatlib(install):
17
+    def finalize_options(self):
18
+        install.finalize_options(self)
19
+        if self.distribution.has_ext_modules():
20
+            self.install_lib = self.install_platlib
21
+
13 22
 setup(
14 23
   name             = 'pyLemma',
15 24
   version          = '0.0.2', 
@@ -37,6 +46,7 @@ setup(
37 46
     '': ['pyFDEM1D.*.so']
38 47
   },
39 48
   zip_safe=False,
49
+  cmdclass={'install':InstallPlatlib},
40 50
   distclass=BinaryDistribution,
41 51
 )
42 52
 

Loading…
Cancel
Save