Browse Source

Merge branch 'master' of https://lemma.codes/Lemma

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

+ 11
- 1
python/setup.py View File

1
 from setuptools import setup, Extension, find_packages
1
 from setuptools import setup, Extension, find_packages
2
+from setuptools.command.install import install
2
 from setuptools.dist import Distribution
3
 from setuptools.dist import Distribution
3
 import sys
4
 import sys
4
 
5
 
7
 
8
 
8
 class BinaryDistribution(Distribution):
9
 class BinaryDistribution(Distribution):
9
     """Distribution which always forces a binary package with platform name"""
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
         return True
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
 setup(
22
 setup(
14
   name             = 'pyLemma',
23
   name             = 'pyLemma',
15
   version          = '0.0.4', 
24
   version          = '0.0.4', 
37
     '': ['LemmaCore.*.so','FDEM1D.*.so']
46
     '': ['LemmaCore.*.so','FDEM1D.*.so']
38
   },
47
   },
39
   zip_safe=False,
48
   zip_safe=False,
49
+  cmdclass={'install':InstallPlatlib},
40
   distclass=BinaryDistribution,
50
   distclass=BinaryDistribution,
41
 )
51
 )
42
 
52
 

Loading…
Cancel
Save