Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -236,6 +237,18 @@ def get_outputs(self):
return self._found_paths


class libusb_bdist_wheel(bdist_wheel):
def finalize_options(self):
bdist_wheel.finalize_options(self)
# This is not a Pure python wheel, so it still needs to be platform specific.
self.root_is_pure = False

def get_tag(self):
python, abi, plat = bdist_wheel.get_tag(self)
# We can replace the python version and abi, and tag it compatible with all Python 3 versions.
return "py3", "none", plat


class BinaryDistribution(Distribution):
def has_ext_modules(self):
return True
Expand All @@ -246,6 +259,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': libusb_bdist_wheel,
},
)
Loading