Skip to content

Conversation

@LER0ever
Copy link
Contributor

This PR adds support for building and developing PyO3 extensions in macOS on Apple Silicon (aarch64-apple-darwin).
Before this PR, maturin gives out an error while guessing the current architecture on arm64 mac.

This PR includes:

This PR does NOT include Universal 2 binary format support, and only produces native arm64 binary wheels on M1 machines.

A screenshot of before and after:

Screen Shot 2020-12-29 at 12 01 35 AM


The target whl filename will include binary format string
`macosx_11_0_arm64` as indicated in the CPython packaging PR that added
support for Apple Silicon: https://github.com/pypa/packaging/pull/319

The dot so file will have the same extension suffix as x86_64 darwin,
specified at
https://docs.python.org/3/whatsnew/3.5.html#build-and-c-api-changes

Updated `platforms` crates to 1.1.0 to include the PR for apple silicon
support, so that guessing platform will not throw an unsupported error.
Ref: https://github.com/RustSec/platforms-crate/pull/32

Signed-off-by: LER0ever <[email protected]>

The target whl filename will include binary format string
`macosx_11_0_arm64` as indicated in the CPython packaging PR that added
support for Apple Silicon: pypa/packaging#319

The dot so file will have the same extension suffix as x86_64 darwin,
specified at
https://docs.python.org/3/whatsnew/3.5.html#build-and-c-api-changes

Updated `platforms` crates to 1.1.0 to include the PR for apple silicon
support, so that guessing platform will not throw an unsupported error.
Ref: https://github.com/RustSec/platforms-crate/pull/32

Signed-off-by: LER0ever <[email protected]>
@konstin
Copy link
Member

konstin commented Jan 8, 2021

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants