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
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 14 additions & 8 deletions Doc/using/configure.rst
Original file line number Diff line number Diff line change
Expand Up @@ -978,14 +978,20 @@ See :source:`Mac/README.rst`.

Options:

* ``universal2``;
* ``32-bit``;
* ``64-bit``;
* ``3-way``;
* ``intel``;
* ``intel-32``;
* ``intel-64``;
* ``all``.
* ``universal2`` (x86-64 and arm64);
* ``32-bit`` (PPC and i386);
* ``64-bit`` (PPC64 and x86-64);
* ``3-way`` (i386, PPC and x86-64);
* ``intel`` (i386 and x86-64);
* ``intel-32`` (i386);
* ``intel-64`` (x86-64);
* ``all`` (PPC, i386, PPC64 and x86-64).

Note that values for this configuration item are *not* the same as the
identifiers used for universal binary wheels on macOS. See the Python
Packaging User Guide for details on the `packaging platform compatibility
tags used on macOS
<https://packaging.python.org/en/latest/specifications/platform-compatibility-tags/#macos>`_

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.

.. option:: --with-framework-name=FRAMEWORK

Expand Down
10 changes: 10 additions & 0 deletions Mac/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,16 @@ a ``python3.x-32`` binary and use the value of ``sys.executable`` as the
Likewise, use ``python3.x-intel64`` to force execution in ``x86_64`` mode
with ``universal2`` binaries.

3. How do I specify binary universal wheels
-------------------------------------------

Binary wheels can also be universal. The platform tag name used to identify
universal binary wheels differs from the naming scheme used when configuring a
universal build with ``--with-universal-archs``. See the Python Packaging User
Guide for details on the `packaging platform compatibility tags used on macOS
<https://packaging.python.org/en/latest/specifications/platform-compatibility-tags/#macos>`_.


Building and using a framework-based Python on macOS
====================================================

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
The wheel tags supported by each macOS universal SDK option are now
documented.
Loading