forked from theochem/PyCI
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
36 lines (26 loc) · 842 Bytes
/
setup.py
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
from setuptools import setup, Distribution
try:
from wheel.bdist_wheel import bdist_wheel as _bdist_wheel
class MyWheel(_bdist_wheel):
def finalize_options(self):
_bdist_wheel.finalize_options(self)
self.root_is_pure = False
def get_tag(self):
return _bdist_wheel.get_tag(self)
class MyDistribution(Distribution):
def __init__(self, *attrs):
Distribution.__init__(self, *attrs)
self.cmdclass['bdist_wheel'] = MyWheel
def is_pure(self):
return False
def has_ext_modules(self):
return True
except ImportError:
class MyDistribution(Distribution):
def is_pure(self):
return False
def has_ext_modules(self):
return True
setup(
distclass=MyDistribution
)