-
Notifications
You must be signed in to change notification settings - Fork 18
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
universal2 wheels for macOS #359
Comments
If it is helpful to have an immediate solution, here are some universal2 builds for Python 3.10 and 3.11 - |
Thanks @radarhere ! Great to have those. |
I've created multi-build/multibuild#495 to help with this. Here are universal2 builds for Python 3.8 and 3.9 - universal2.zip |
Thank you for the PR! Do we need I'm mindful we have about 60 wheels per release, and expect other architectures will be added at some point, using resources on PyPI (it costs a donated $1.8M per month to run PyPI!) and increasing the (2 hour+) build times here: ~15m each for Looking at the advice at cibuildwheel (we use multibuild rather than cibuildwheel, but it's generic advice):
macOS 11 Big Sur is the oldest supported, so this sets a baseline of pip 20.3 for replacing
Same pip version.
Same pip version needed for replacing File sizes for each architecture are about the same, regardless of Python version:
I don't think 5.8M is too big for a single combined installer?
So they suggest there's limited benefit building all three.
This advice is from Feb 2021 (pypa/cibuildwheel#577), two years later we should be fine with only Or if we want to be cautious, how about And because Python 3.7 can only use |
A possible alternative would just be to document how users can create universal2 wheels themselves from our existing x86_64 and arm64 wheels. $ python3 -m pip download --only-binary=:all: --platform macosx_10_10_x86_64 Pillow
Collecting Pillow
Using cached Pillow-9.4.0-2-cp39-cp39-macosx_10_10_x86_64.whl (3.3 MB)
Saved ./Pillow-9.4.0-2-cp39-cp39-macosx_10_10_x86_64.whl
Successfully downloaded Pillow
$ python3 -m pip download --only-binary=:all: --platform macosx_11_0_arm64 Pillow
Collecting Pillow
Using cached Pillow-9.4.0-cp39-cp39-macosx_11_0_arm64.whl (3.0 MB)
Saved ./Pillow-9.4.0-cp39-cp39-macosx_11_0_arm64.whl
Successfully downloaded Pillow
$ python3 -m pip install delocate from delocate.fuse import fuse_wheels
fuse_wheels('Pillow-9.4.0-2-cp39-cp39-macosx_10_10_x86_64.whl', 'Pillow-9.4.0-cp39-cp39-macosx_11_0_arm64.whl', 'Pillow-9.4.0-cp39-cp39-macosx_11_0_universal2.whl') I've created python-pillow/Pillow#6912 for this. |
It might be worth noting that before 20.3, pip only supported Python < 3.9 - https://pypi.org/project/pip/20.2.4/. So at the very least, when we drop support for Python 3.8 with Pillow 11, the end user will have to be using pip 20.3. |
python-pillow/Pillow#6912 was merged, and the documentation can now be seen under the macOS tab at https://pillow.readthedocs.io/en/stable/installation.html#basic-installation |
That's super helpful, and I think will work just as well for our use case. Thanks! |
Given #359 (comment), and we've documented how to create a combined universal2 wheel (python-pillow/Pillow#6912), I don't see a need to also produce universal2 wheels in addition to the single-architecture ones. |
Hello! It would be really helpful to have
universal2
builds of Pillow available for macOS in addition to thex86_64
andarm64
builds.Having a single wheel that supports both platforms makes it a lot easier to release tools across both macOS architectures.
The text was updated successfully, but these errors were encountered: