Skip to content
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

Misfeature: universal wheel filename has "-py2.py3" even with requires-python=">=3" #806

Closed
dbarnett opened this issue Aug 29, 2024 · 6 comments

Comments

@dbarnett
Copy link

Is it intentional that there's a "py2" in universal wheel filenames that the build builder creates?

For instance, if I clone https://github.com/insanum/gcalcli/tree/4dabc51664aad65db282668769e85db83a057bb5 and run python -m build it outputs a file dist/gcalcli-4.4.0-py2.py3-none-any.whl, where the "py2" is misleading because it explicitly does not support EOL python 2.

@layday
Copy link
Member

layday commented Aug 29, 2024

build is a unified front end for build systems. The wheel is generated by your build system, in this case setuptools. Please open a ticket on the setuptools tracker.

@layday layday closed this as not planned Won't fix, can't repro, duplicate, stale Aug 29, 2024
@henryiii
Copy link
Contributor

For setuptools, “universal” means py2.py3. You should remove the “universal” setting. It’s no longer needed or helpful.

@dbarnett
Copy link
Author

dbarnett commented Aug 29, 2024

Ah thanks, in that case maybe the real misfeature is that nothing warns when you combine tool.distutils.bdist_wheel.universal = true with project.requires-python = ">= 3".

The setuptools docs say to use it "If your project contains no C extensions and is expected to work on both Python 2 and 3", which to me sounded more like a general expectation that it's compatible with different configurations vs. an endorsement that it supports python <3.

@layday
Copy link
Member

layday commented Aug 29, 2024

Indeed, so it might be worth bringing it up with setutpools if nobody has already.

@dbarnett
Copy link
Author

Indeed, so it might be worth bringing it up with setutpools if nobody has already.

Done: pypa/setuptools#4613

@henryiii
Copy link
Contributor

expected to work on both Python 2

If your project doesn't meet the requirements (no Python 2 support), why would you set this option? You don't need to tell setuptools your package doesn't contain C extensions, it knows that already. This was only added as a way to tell Python 2+3 packages long before requires-python was a thing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants