Skip to content

gh-129712: Document the wheels tags corresponding to each universal SDK. #130389

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

Merged
merged 4 commits into from
Feb 22, 2025

Conversation

freakboy3742
Copy link
Contributor

@freakboy3742 freakboy3742 commented Feb 21, 2025

In the process of getting iOS and Android wheel tags accepted into PyPI, I noticed that there isn't a 1-1 correlation between the --with-universal-archs flag passed to ./configure, and the wheel tags supported by the builds produced when that flag is used.

Most of these options are for entirely historical benefit - there's very little practical use for any value other than universal2. PPC64 hardware hasn't been available since 2006, and support for 32 bit Intel machines was dropped in 2011. However, the other values exist, and the inconsistency between the configuration value and wheel tag isn't documented anywhere. Until such time as these options are removed, we should at least document them.


📚 Documentation preview 📚: https://cpython-previews--130389.org.readthedocs.build/

* ``intel`` (i386 and x86-64; supports ``intel`` wheels);
* ``intel-32`` (i386; supports ``i386`` wheels);
* ``intel-64`` (x86-64; supports ``x86_64`` wheels);
* ``all`` (PPC, i386, PPC64 and x86-64; supports ``universal`` wheels).

Copy link
Member

@ned-deily ned-deily Feb 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[edited] I think the terminology is misleading here. For example, supports to me implies that a universal2 build could only make use of universal2 wheels but that's not the case: it potentially supports wheels with universal2 or arm64 or x86_64 or, for completeness sake, intel or universal or fat3 or fat64 tags depending on the running arch. Likewise, for many of the other configure options. The minimum requirement for a compatible wheel is (or should be) that the architecture that the interpreter is running in is included in the set of binaries included in the wheel (there are other requirements regarding deployment targets etc). There isn't a one-to-one match. Perhaps this configure doc isn't the place to try to discuss this. Note that this section has a link at its beginning to the Mac/README.rst file which does go into some more detail about universal builds and these configure options. Perhaps something can be added there about wheels, if nothing else include a link to (what I believe to be) the canonical description of the wheel tag values in the Python Packaging User Guide. Opinions?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah - I completely missed the reference to the Mac README. That definitely fills in a lot of gaps.

I think there's still room to clarify what fat3 actually means in this location (rather than leaving it to the reader to work out that it's defined in the README); and both locations would benefit from highlighting that the configuration value used for --with-universal-archs doesn't match the platform tag. I've pushed an update that (hopefully) addresses this concern.

@freakboy3742 freakboy3742 requested a review from a team as a code owner February 21, 2025 07:18
Copy link
Member

@ned-deily ned-deily left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, that's a big improvement over the original documentation.

@freakboy3742 freakboy3742 merged commit 474c388 into python:main Feb 22, 2025
26 checks passed
@miss-islington-app
Copy link

Thanks @freakboy3742 for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12, 3.13.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Feb 22, 2025
…rsal SDK. (pythonGH-130389)

Document the architectures supported by macOS universal SDK configuration flags,
and add details on wheel tag naming.
(cherry picked from commit 474c388)

Co-authored-by: Russell Keith-Magee <[email protected]>
@bedevere-app
Copy link

bedevere-app bot commented Feb 22, 2025

GH-130449 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label Feb 22, 2025
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Feb 22, 2025
…rsal SDK. (pythonGH-130389)

Document the architectures supported by macOS universal SDK configuration flags,
and add details on wheel tag naming.
(cherry picked from commit 474c388)

Co-authored-by: Russell Keith-Magee <[email protected]>
@bedevere-app
Copy link

bedevere-app bot commented Feb 22, 2025

GH-130450 is a backport of this pull request to the 3.12 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.12 only security fixes label Feb 22, 2025
@freakboy3742 freakboy3742 deleted the macos-tags branch February 22, 2025 08:33
freakboy3742 added a commit that referenced this pull request Feb 22, 2025
…ersal SDK. (GH-130389) (#130449)

Document the architectures supported by macOS universal SDK configuration flags,
and add details on wheel tag naming.
(cherry picked from commit 474c388)

Co-authored-by: Russell Keith-Magee <[email protected]>
freakboy3742 added a commit that referenced this pull request Feb 22, 2025
…ersal SDK. (GH-130389) (#130450)

Document the architectures supported by macOS universal SDK configuration flags,
and add details on wheel tag naming.
(cherry picked from commit 474c388)

Co-authored-by: Russell Keith-Magee <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants