diff --git a/setup.py b/setup.py index ee55db3..8bbd2a2 100644 --- a/setup.py +++ b/setup.py @@ -26,6 +26,7 @@ import sys from setuptools import setup, Extension, Distribution from setuptools.command.build_ext import build_ext +from wheel.bdist_wheel import bdist_wheel import shutil import sysconfig @@ -235,6 +236,15 @@ def get_names(self): def get_outputs(self): return self._found_paths +class bdist_wheel_abi_none(bdist_wheel): + def finalize_options(self): + bdist_wheel.finalize_options(self) + self.root_is_pure = False + + def get_tag(self): + python, abi, plat = bdist_wheel.get_tag(self) + return "py3", "none", plat + class BinaryDistribution(Distribution): def has_ext_modules(self): @@ -246,6 +256,7 @@ def has_ext_modules(self): # Dummy extension to trigger build_ext ext_modules=[Extension('', sources=[])], cmdclass={ - 'build_ext': libusb_build_ext + 'build_ext': libusb_build_ext, + 'bdist_wheel': bdist_wheel_abi_none, }, )