Skip to content
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

Build macOS arm64 wheels natively #7852

Merged
merged 2 commits into from Mar 7, 2024

Conversation

radarhere
Copy link
Member

#7766 started testing macOS CI jobs on M1 where available.

We can go further, building macOS M1 wheels natively. This also means that we can start testing macOS M1 wheels, apart from Python 3.8.

@hugovk
Copy link
Member

hugovk commented Mar 3, 2024

Very nice!

We now also get the two arm64 PyPy wheels, plus testing of them all, for only an extra 4 minutes of build time!

Here we go!

Note: pp310-macosx_arm64, pp39-macosx_arm64 were selected, but can't be built on x86_64 so will be skipped automatically.
Running before_all...
                                                            ✓ 708.81s
...
5 wheels produced in 16 minutes:
  pillow-10.3.0.dev0-cp310-cp310-macosx_11_0_arm64.whl   3,247 kB
  pillow-10.3.0.dev0-cp311-cp311-macosx_11_0_arm64.whl   3,247 kB
  pillow-10.3.0.dev0-cp312-cp312-macosx_11_0_arm64.whl   3,246 kB
  pillow-10.3.0.dev0-cp38-cp38-macosx_11_0_arm64.whl     3,247 kB
  pillow-10.3.0.dev0-cp39-cp39-macosx_11_0_arm64.whl     3,247 kB

https://github.com/python-pillow/Pillow/actions/runs/8098719797/job/22132792628?pr=7843#step:5:11469

Here we go!
...
7 wheels produced in 20 minutes:
  pillow-10.3.0.dev0-cp310-cp310-macosx_11_0_arm64.whl          3,444 kB
  pillow-10.3.0.dev0-cp311-cp311-macosx_11_0_arm64.whl          3,444 kB
  pillow-10.3.0.dev0-cp312-cp312-macosx_11_0_arm64.whl          3,443 kB
  pillow-10.3.0.dev0-cp38-cp38-macosx_11_0_arm64.whl            3,444 kB
  pillow-10.3.0.dev0-cp39-cp39-macosx_11_0_arm64.whl            3,444 kB
  pillow-10.3.0.dev0-pp310-pypy310_pp73-macosx_11_0_arm64.whl   3,415 kB
  pillow-10.3.0.dev0-pp39-pypy39_pp73-macosx_11_0_arm64.whl     3,415 kB

https://github.com/python-pillow/Pillow/actions/runs/8129523783/job/22216725266?pr=7852#step:5:16109

  x86_64 arm64
Running before_all... 708.81 285.90s
     
Building cp38-macosx_arm64 wheel    
CPython 3.8 macOS arm64 - Apple Silicon    
     
Installing Python cp38... 30.47s 21.98s
Setting up build environment... 10.56s 4.97s
Installing build tools... 2.48s 1.38s
Building wheel... 24.69s 82.94s
Repairing wheel... 7.85s 18.57s
     
cp38-macosx_arm64 finished in 76.07s 129.84s
     
Building cp39-macosx_arm64 wheel    
CPython 3.9 macOS arm64 - Apple Silicon    
     
Installing Python cp39... 28.76s 11.28s
Setting up build environment... 6.94s 3.20s
Installing build tools... 1.69s 0.60s
Building wheel... 24.63s 9.91s
Repairing wheel... 7.85s 3.61s
Testing wheel...   83.57s
     
cp39-macosx_arm64 finished in 69.89s 112.18s
     
Building cp310-macosx_arm64 wheel    
CPython 3.10 macOS arm64 - Apple Silicon    
     
Installing Python cp310... 29.93s 10.60s
Setting up build environment... 7.16s 3.00s
Installing build tools... 1.52s 0.57s
Building wheel... 19.66s 11.41s
Repairing wheel... 6.08s 4.10s
Testing wheel...   75.86s
     
cp310-macosx_arm64 finished in 64.36s 105.58s
     
Building cp311-macosx_arm64 wheel    
CPython 3.11 macOS arm64 - Apple Silicon    
Installing Python cp311... 0.02s 0.02s
Setting up build environment... 6.55s 3.41s
Installing build tools... 1.16s 0.69s
Building wheel... 19.30s 9.83s
Repairing wheel... 5.97s 3.50s
Testing wheel...   74.04s
     
cp311-macosx_arm64 finished in 33.02s 91.51s
     
Building cp312-macosx_arm64 wheel    
CPython 3.12 macOS arm64 - Apple Silicon    
     
Installing Python cp312... 0.02s 0.02s
Setting up build environment... 6.23s 3.93s
Installing build tools... 1.48s 0.73s
Building wheel... 20.76s 10.02s
Repairing wheel... 6.00s 3.55s
Testing wheel...   71.79s
     
cp312-macosx_arm64 finished in 34.50s 90.06s
     
Building pp39-macosx_arm64 wheel    
PyPy 3.9 macOS arm64 - Apple Silicon    
     
Installing Python pp39...   1.97s
Setting up build environment...   3.07s
Installing build tools...   1.16s
Building wheel...   10.83s
Repairing wheel...   3.88s
Testing wheel...   164.64s
     
pp39-macosx_arm64 finished in   185.58s
     
Building pp310-macosx_arm64 wheel    
PyPy 3.10 macOS arm64 - Apple Silicon    
     
Installing Python pp310...   2.29s
Setting up build environment...   3.77s
Installing build tools...   1.27s
Building wheel...   12.49s
Repairing wheel...   4.31s
Testing wheel...   164.54s
     
pp310-macosx_arm64 finished in   188.71s
     
Total 986.65s 1189.36s

@hugovk hugovk added the Build label Mar 3, 2024
@nulano
Copy link
Contributor

nulano commented Mar 3, 2024

Hmm, this seems to have added libwebp.7.1.8.dylib and libsharpyuv.0.0.1.dylib on x86_64:

image

and libjpeg.8.3.2.dylib on arm64:

image

For comparison, the list of dylibs was the same on both x86_64 and arm64 before:

image

@radarhere
Copy link
Member Author

Thanks for spotting. I've pushed a commit that should fix that.

@radarhere radarhere merged commit ea78028 into python-pillow:main Mar 7, 2024
34 of 35 checks passed
@radarhere radarhere deleted the arm64_wheels branch March 7, 2024 04:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants