-
Notifications
You must be signed in to change notification settings - Fork 50
Description
Hello! I'm building a package on Linux with extension modules, using setuptools + wheel, and pypa/build to run the build command. I've added a custom distribution class to force platform-specific wheels:
class BinaryDistribution(Distribution):
"""Distribution which always forces a binary package with platform name"""
def has_ext_modules(self):
return True
def is_pure(self):
return False
setup(..., distclass=BinaryDistribution)This successfully generates a Linux-specific wheel. Now I want to "repair" the wheel in order to publish it to PyPi. I'm using pypa/auditwheel for this, but it gives this error:
RuntimeError: Invalid binary wheel, found the following shared library/libraries in purelib folder:
prophet_model.bin
diagnose
print
stanc
stansummary
diagnose.o
print.o
stansummary.o
bernoulli
main.o
The wheel has to be platlib compliant in order to be repaired by auditwheel.
I had initially thought it could be an issue with auditwheel (posted a question here: pypa/auditwheel#333 (comment)) but I noticed that auditwheel is simple checking the metadata of the wheel here. I'm wondering if there's actually an issue in the wheel creation that's causing the extension modules to land in purelib. Would really appreciate any tips / where to start looking to solve this!