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

Do not declare Python-3-only wheels as universal #153

Closed
wants to merge 1 commit into from

Conversation

michael-k
Copy link

Only wheels that support both Python 2 and 3 are universal. Support for Python 2 was dropped in commit 5efdd48 (part of release 2020.04.05.2).

@sigmavirus24
Copy link
Member

Technically these wheels are universal in the sense that they run on every Python platform. There's lots of heated discussion around whether universal = true is py2 + py3 or whether it means something else and has the unfortunate side-effect of also labelling a wheel as py2 and py3.

@michael-k
Copy link
Author

Can you point me to such a discussion? I'm only aware of the following documentation

If your project also supports Python 2 and contains no C extensions, then you should create what’s called a Universal Wheel by adding the following to your setup.cfg file:

[bdist_wheel]
universal=1

Only use this setting if your project does not have any C extesions and supports Python 2 and 3.

https://packaging.python.org/guides/distributing-packages-using-setuptools/#wheels

@graingert
Copy link

@sigmavirus24 I recently asked for clarification on this from the pyca and yes universal=0 is the preferred option for requires_python >= 3 wheels

@graingert
Copy link

@sigmavirus24
Copy link
Member

If you look at pypa/twine#739 the pypa can not even agree on what universal meant when implemented versus what it means now. Further the community does not agree either. I don't think it's safe to prefer =0 strictly especially given the orthogonally implemented requires-python

@graingert
Copy link

Yeah I don't know. I prefer =1 over =0 personally

@michael-k
Copy link
Author

Thanks for the links. Why does Python packaging have to be so complicated … :/

@michael-k michael-k closed this Jul 5, 2021
@michael-k michael-k deleted the non-universal-wheels branch July 5, 2021 12:40
@sigmavirus24
Copy link
Member

Why does Python packaging have to be so complicated … :/

Because it's founded entirely on volunteer time. Only recently has the PSF started funding/investing in packaging. Even then, 3 people can read the same specification and understand 3 different things from it. 1 may take it entirely literally, 1 may read extra into in one direction, and the third may read something else entirely different into the specification. Packaging isn't hard, humans are and it's hard to have conversations entirely over Discourse/Email/Chat that clarify these assumptions because many people aren't trained to recognize those assumptions in the moment.

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

Successfully merging this pull request may close these issues.

3 participants