-
Notifications
You must be signed in to change notification settings - Fork 61
/
Copy pathsetup.py
32 lines (24 loc) · 887 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
import sys
from setuptools import setup
# from setuptools.dist import Distribution
# class BinaryDistribution(Distribution):
# """Distribution which always forces a binary package with platform name"""
# def has_ext_modules(foo):
# return sys.platform.startswith("win")
try:
from wheel.bdist_wheel import bdist_wheel as _bdist_wheel
class bdist_wheel(_bdist_wheel):
def finalize_options(self):
super().finalize_options()
self.root_is_pure = not sys.platform.startswith("win")
def get_tag(self):
python, abi, plat = _bdist_wheel.get_tag(self)
# We don't contain any python source
python, abi = "py2.py3", "none"
return python, abi, plat
except ImportError:
bdist_wheel = None
setup(
# distclass=BinaryDistribution,
cmdclass={"bdist_wheel": bdist_wheel},
)