Skip to content

Commit

Permalink
Docs/examples updates
Browse files Browse the repository at this point in the history
  • Loading branch information
joerick committed Aug 8, 2022
1 parent 61480e2 commit 03c8f5b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
11 changes: 5 additions & 6 deletions docs/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,11 @@ to load on Apple Silicon.
available.

Generally speaking, because Pip 20.3 is required for the `universal2` wheel,
most packages should provide both `x86_64` and `universal2` wheels for now.
Once Pip 20.3+ is common on macOS, then it should be possible to ship only the
`universal2` wheel.
most packages should provide both `x86_64` and one of `universal2`/`arm64`
wheels for now. When Pip 20.3+ is common on macOS, then it might be possible
to ship only the `universal2` wheel.

**Apple Silicon wheels are not built by default**, but can be enabled by adding extra archs to the [`CIBW_ARCHS_MACOS` option](options.md#archs) - e.g. `x86_64 arm64 universal2`. Cross-compilation is provided by the Xcode toolchain.
**Apple Silicon wheels are not built by default on Intel runners**, but can be enabled by adding extra archs to the [`CIBW_ARCHS_MACOS` option](options.md#archs) - e.g. `x86_64 arm64`. Cross-compilation is provided by the Xcode toolchain.

!!! important
When cross-compiling on Intel, it is not possible to test `arm64` and the `arm64` part of a `universal2` wheel.
Expand All @@ -66,8 +66,7 @@ Once Pip 20.3+ is common on macOS, then it should be possible to ship only the

Hopefully, cross-compilation is a temporary situation. Once we have widely
available Apple Silicon CI runners, we can build and test `arm64` and
`universal2` wheels natively. That's why `universal2` wheels are not yet built
by default, and require opt-in by setting `CIBW_ARCHS_MACOS`.
`universal2` wheels natively. That's why `universal2`/`arm64` wheels require opt-in by setting `CIBW_ARCHS_MACOS`.

!!! note
Your runner needs Xcode Command Line Tools 12.2 or later to build `universal2` or `arm64`.
Expand Down
2 changes: 1 addition & 1 deletion docs/options.md
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ Default: `auto`
| Linux / Intel | `x86_64` | `x86_64` `i686` | `x86_64` | `i686` |
| Windows / Intel | `AMD64` | `AMD64` `x86` | `AMD64` | `x86` |
| macOS / Intel | `x86_64` | `x86_64` | `x86_64` | |
| macOS / Apple Silicon | `arm64` | `arm64` `universal2` | `arm64` `universal2`| |
| macOS / Apple Silicon | `arm64` | `arm64` | `arm64` | |

If not listed above, `auto` is the same as `native`.

Expand Down
2 changes: 1 addition & 1 deletion examples/github-apple-silicon.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- name: Build wheels
uses: pypa/[email protected]
env:
CIBW_ARCHS_MACOS: x86_64 universal2
CIBW_ARCHS_MACOS: x86_64 arm64

- uses: actions/upload-artifact@v3
with:
Expand Down

0 comments on commit 03c8f5b

Please sign in to comment.