Order of architectures in platform tags on macOS
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 751
- Forks
- 324
- Avg merge
- 12h 58m
- Merged PRs (30d)
- 3
Description
The order of architectures in the result of tags.mac_platform() does not look at the type of python installation and prefers non-universal wheels over universal wheels. I'd prefer behaviour where tags.mac_platform() prefers universal wheels over non-universal wheels.
An example: when running on an intel mac "pip install foo" will prefer a wheel with tag "macosx_10_9_x86_64" over a wheel with tag "macosx_10_9_universal2", I'd prefer to install the universal2 wheel instead.
The primary motivation of this is that installation of "universal2" wheels makes it possible to use tools like py2app and pyinstaller to create application bundles that support both CPU architectures ("Universal 2 binaries" in Apple speak).
A disadvantage is slightly higher disk usage when universal2 wheels are used.
As an aside: In the long run I'd hope that most projects currently providing mac wheels will provide "universal2" wheels, but I expect that there will be "x86_64" wheels as well for the foreseeable future because only fairly recent versions of pip support universal2 wheels.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the tags.mac_platform() entry point and inspect how architecture tags are ordered for Intel macOS installations. Look for existing tests covering x86_64 and universal2 tags, then update or add coverage so the requested preference is explicit. Done means the relevant tests pass and universal2 is ordered ahead of x86_64 in the described case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100