Skip to content

Commit be55ad5

Browse files
committed
Build wheels as py3-none-{platform}.
1 parent 7a62b64 commit be55ad5

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

setup.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
import sys
2727
from setuptools import setup, Extension, Distribution
2828
from setuptools.command.build_ext import build_ext
29+
from wheel.bdist_wheel import bdist_wheel
2930
import shutil
3031
import sysconfig
3132

@@ -235,6 +236,15 @@ def get_names(self):
235236
def get_outputs(self):
236237
return self._found_paths
237238

239+
class bdist_wheel_abi_none(bdist_wheel):
240+
def finalize_options(self):
241+
bdist_wheel.finalize_options(self)
242+
self.root_is_pure = False
243+
244+
def get_tag(self):
245+
python, abi, plat = bdist_wheel.get_tag(self)
246+
return "py3", "none", plat
247+
238248

239249
class BinaryDistribution(Distribution):
240250
def has_ext_modules(self):
@@ -246,6 +256,7 @@ def has_ext_modules(self):
246256
# Dummy extension to trigger build_ext
247257
ext_modules=[Extension('', sources=[])],
248258
cmdclass={
249-
'build_ext': libusb_build_ext
259+
'build_ext': libusb_build_ext,
260+
'bdist_wheel': bdist_wheel_abi_none,
250261
},
251262
)

0 commit comments

Comments
 (0)