architecture-specific binaries are preferred on macOS when universal2 should always be selected
See original GitHub issueDescription
If pip
sees both x86_64
and universal2
wheels on an x86_64
machine, it will prefer to install x86_64
wheels, creating a partially-broken virtual environment that cannot be used to create universal2
(i.e. “broadly usable”) redistributables.
Expected behavior
I would expect that pip
would prefer to install universal2
artifacts when available, so that when building an app with e.g. py2app
in a virtual environment created with pip
, I’d be able to create a universal2
application even if I don’t have an Apple Silicon mac handy.
This is particularly an issue because package maintainers who want to be friendly to older versions of pip
that don’t support universal2
properly are creating architecture-specific binaries, and the existence of those creates a worse and more error-prone experience for newer, more up-to-date pip
users.
pip version
22.3
Python version
3.11.0
OS
macOS
How to Reproduce
arch -arch x86_64 ./asdf/bin/python3 -m pip install cryptography
Output
Downloading http://127.0.0.1:3141/root/pypi/%2Bf/3fc/26e22840b7732/cryptography-38.0.1-cp36-abi3-macosx_10_10_x86_64.whl (2.8 MB)
Code of Conduct
- I agree to follow the PSF Code of Conduct.
Issue Analytics
- State:
- Created a year ago
- Reactions:2
- Comments:6 (4 by maintainers)
This is actually exacerbated by the impossibility of manually installing
universal2
wheels when platform-specific wheels are also available (see https://github.com/pypa/pip/issues/5453).x-ref https://github.com/pypa/packaging/issues/381