-
Notifications
You must be signed in to change notification settings - Fork 122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How can I change wheel name's platform tag? #480
Comments
First, I'd have to ask: are you sure you want to change it? The "correct" way is to produce a To see how to do this properly, check Anyway, assuming you are aware of that and this is actually what you want, you can see an example of how to change the tags at scikit-build/ninja-python-distributions#85 - though this is not guaranteed to be kept by future versions of wheel. I've got a PR to wheel pypa/wheel#422 that is on hold (wheel development is slow) that would add a utility for renaming. Finally, I'd guess if you used |
But auditwheel isn't working for me. When I do the "auditwheel show" is says my wheel 'is consistent with the |
What are you trying to target? Though if you are trying to build distributable wheels, I highly recommend trying cibuildwheel, that's what it's designed for. |
I was expecting auditwheel to "repair" it to the platform it deduced it was, instead of the default "linux_x86_64". And that is what I expect that "python -m build" would do too -- either by default or with some option. Looks like I'll be parsing the output of "auditwheel show" and renaming the wheel myself (maybe there's an auditwheel API to get the platform without the extra verbage?). Thanks for the tip about cibuildwheel. It seems like overkill, but I will take a look. |
Unless you are running inside a manylinux docker container, how would you deduce a platform? An arbitrary linux machine is not a safe place to build wheels; you should be running in manylinux (or musllinux). And if you are inside a manylinux docker image, you should know what docker image you are inside. (cibuildwheel or multibuild does all this automatically for you). This is not something |
(This does depend on what you are using - if you are not using GLIBC, like with Rust, it becomes much easier, and the docker image isn't as important) |
In this case, I am using a CentOS 7, aka In my main work, we use Python inside an application. And we use wheels internally to do upgrades between releases. There the Linux platform name doesn't really matter because it is all controlled by the application. But at some point in the future, we would like to put the independently useful packages on pypi with the correct platform tags. And it would be nice to just give an option to |
Using "setup.py bdist_wheel", I can change the platform tag used for the binary wheel name from the default linux_x86_64 to manylinux2014_x86_64 by giving bdist_wheel options in setup.py. For example:
But "python3 -m build" does not use the bdist_wheel options. Is there another way to do it?
For reference, I'm actually picking the most specific platform tag dynamically with:
This is with build==0.8.0, packaging==20.4, setuptools==41.1.0.post, and wheel==0.35.1 with Python 3.6 on CentOS 7.
The text was updated successfully, but these errors were encountered: