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

Wheels are only universal if they support Python 2 & 3 #5987

Closed
wants to merge 1 commit into from

Conversation

michael-k
Copy link

@michael-k michael-k commented Mar 4, 2021

Issue #, if available: n/a

Description of changes:

Remove the universal flag from section wheel in setup.cfg, because wheels are only universal if they support both Python 2 and 3.


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@kdaily
Copy link
Member

kdaily commented Mar 4, 2021

Hi @michael-k, thanks for the PR. What's the impact of having this configured as it is now?

@kdaily kdaily added the response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. label Mar 4, 2021
@michael-k
Copy link
Author

What's the impact of having this configured as it is now?

I'm not familiar with all the details of Python's packaging. Therefore my answer is probably incomplete.

In general when supporting Python 2 and 3 one wanted non-universal wheels when using (optional) C extensions. Since Python 2 is less and less common and the introduction of python_requires (which is used by aws-cli v1, but not v2?), the impact for Python-3-only packages is probably low.

I don't know if there's any impact at all for aws-cli v2 since it's sadly not on PyPI and people installing directly from source (see eg. #4947 (comment)) are creating the appropriate wheel (if at all) for their version of Python.

When running the following you can see that it creates wheels botocore-2.0.0.dev97-py2.py3-none-any.whl (botocore v2 also has universal set to 1 and doesn't use python_requires) and awscli-2.1.29-py2.py3-none-any.whl.

python -m venv .venv
source .venv/bin/activate
python -m pip install wheel
python -m pip install  https://github.com/boto/botocore/archive/v2.tar.gz
python -m pip install  https://github.com/aws/aws-cli/archive/v2.tar.gz
deactivate

When running python setup.py bdist_wheel in the v2 branch it creates dist/awscli-2.1.29-py2.py3-none-any.whl when universal is set to 1 and dist/awscli-2.1.29-py3-none-any.whl with the change proposed in this PR.


TL;DR There's probably no practical impact at the moment.

@kdaily kdaily added pr:needs-review This PR needs a review from a Member. installation and removed response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. labels Mar 15, 2021
@michael-k
Copy link
Author

Here's some documentation for universal wheels: https://packaging.python.org/guides/distributing-packages-using-setuptools/#universal-wheels

@justindho
Copy link
Contributor

It looks like the latest setup.cfg on the v2 branch has this PR's proposed changes included already, so I'll be closing this PR.

@justindho justindho closed this Jun 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
installation pr:needs-review This PR needs a review from a Member.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants