-
Notifications
You must be signed in to change notification settings - Fork 56
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
add support for macOS arm64, build wheels #92
Conversation
Upstream wasmtime releases use aarch64-macos as part of the file name. On aarch64 macOS, platform.machine() returns 'arm64' instead. With this change, download-wasmtime.py correctly downloads aarch64-macos binaries and _ffi.py correctly loads them.
The test failures for other platforms are because of an incompatibility between pytest-flake8 and the recently released flake8 5.x. This should be fixed by tholo/pytest-flake8#88. In the meantime I can pin flake8 to 4.0.1 in setup.py. |
pytest-flake8 is currently incompatible with 5.x flake8 releases. This downgrades flake8 to an older version which still works.
7234b95
to
3c46e7d
Compare
This all looks great to me, thanks! I'm happy to merge as I think the test failures will be fixed in the next release of Wasmtime if you'd like |
@alexcrichton Thanks for reviewing! If you don't mind the test failures, sure please go ahead and merge this. My use case doesn't depend on trap functionality, so I'd be happy to see a new release of wasmtime-py with macOS arm64 wheels even in the current state. |
Sounds good! I think there's a Wasmtime release tomorrow actually, so this should get picked up tomorrow |
hi! this PR's changes aren't reflected in the README yet. |
@alexcrichton looks like 0.40.0 was released, could you please tag the new version here as well? |
just to confirm, if I bump VERSION to 0.40.0, download and build the wheel its all working for me on the M2 macbook pro |
I'm doing the version bump in #93 |
This PR adds support for macOS arm64 platforms. Changes are as follows:
Handle platform.machine() == arm64 for macOS.
Upstream wasmtime releases use aarch64-macos as part of the file name. On aarch64 macOS, platform.machine() returns 'arm64' instead. With this change, download-wasmtime.py correctly downloads aarch64-macos binaries and _ffi.py correctly loads them.
Build wheels for macOS arm64 in CI. This should close wasmtime arm64 wheel for mac m1 #79.
I ran tests on macOS-arm64 with python 3.8.9 using
pytest
, and two failures were reported:(The PR is "draft" because of this failure.)
I have also tested a relatively simple project (
astyle
code formatter compiled to WebAssembly) with this branch, and it worked correctly.