You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Creating pure Python wheels when using build scripts #3594
then poetry build creates a platform wheel like hello-0.1.0-cp39-cp39-manylinux2014_x86_64.whl, which makes sense when building C-extensions.
But, when one wants to use build.py to generate some platform-independent resource files from the source (corresponding to setup.py build_py), platform wheels are not needed and pure Python wheels like hello-0.1.0-py3-none-any.whl may suffice.
It would be great if one could select pure Python wheels (and possibly also universal wheels) by configuring in pyproject.toml, for example,
[tool.poetry.build]
pure-python-wheel = true
Reacted by Ralf Grubenmann, Will Da Silva and Alex Ball
The former already has a comment about the fact that poetry assumes platform wheels when build.py is used, pure Python wheels otherwise. I would close this as a duplicate.
FWIW, I think this is still a good idea as a stop gap until there is more full featured support build scripts. Having such an option would make it easier to build with the build script when using --format sdist and not when using --format wheel and avoid building wheels with arbitrary tags, but still have say Cython support when building an sdist.
Currently, the only way to do this is to manually exit the pyproject.toml file, remove the build line and rebuild.
Activity
sinoroc commentedon Jan 21, 2021
I think there are already tickets on the topic of the platform tags of the wheel. Maybe you can find some valuable info in those.
tueda commentedon Jan 21, 2021
Thank you for the comment. Indeed, it seems that I should have searched "platform tags" more thoroughly in the Issues. I found
The former already has a comment about the fact that
poetryassumes platform wheels whenbuild.pyis used, pure Python wheels otherwise. I would close this as a duplicate.gitonthescene commentedon Jun 24, 2021
FWIW, I think this is still a good idea as a stop gap until there is more full featured support build scripts. Having such an option would make it easier to build with the build script when using
--format sdistand not when using--format wheeland avoid building wheels with arbitrary tags, but still have sayCythonsupport when building an sdist.Currently, the only way to do this is to manually exit the
pyproject.tomlfile, remove thebuildline and rebuild.github-actions commentedon Mar 2, 2024
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.