From 08165ffeed49c999c009a11fd9778052fb35f6b4 Mon Sep 17 00:00:00 2001 From: Eric Larson Date: Thu, 27 Jun 2024 11:52:32 -0400 Subject: [PATCH] DOC: Document macOS 3.8 arm64 workaround (#1871) * BUG: Fix bug with macOS 3.8 arm64 URL * TST: Ping * DOC: Update * FIX: Remove old * DOC: Both * Apply suggestions from code review Co-authored-by: Matthieu Darbois --------- Co-authored-by: Matthieu Darbois --- docs/faq.md | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/docs/faq.md b/docs/faq.md index ed2c391d..bce7b952 100644 --- a/docs/faq.md +++ b/docs/faq.md @@ -363,16 +363,25 @@ If you're building on an arm64 runner, you might notice something strange about This is fine for simple C extensions, but for more complicated builds on arm64 it becomes an issue. -So, if the cross-compilation is an issue for you, there is an 'experimental' installer available that's built natively for arm64. - -To use this installer and perform native CPython 3.8 building, before invoking cibuildwheel, install the universal2 version of Python on your arm64 runner, something like: +So, if you want to build macOS arm64 wheels on an arm64 runner (e.g., `macos-14`) on Python 3.8, before invoking cibuildwheel, you should install a native arm64 Python 3.8 interpreter on the runner: -```bash -curl -o /tmp/Python38.pkg https://www.python.org/ftp/python/3.8.10/python-3.8.10-macos11.pkg -sudo installer -pkg /tmp/Python38.pkg -target / -sh "/Applications/Python 3.8/Install Certificates.command" -``` +!!! tab "GitHub Actions" + + ```yaml + - uses: actions/setup-python@v5 + with: + python-version: 3.8 + if: runner.os == 'macOS' && runner.arch == 'ARM64' + ``` + +!!! tab "Generic" + + ```bash + curl -o /tmp/Python38.pkg https://www.python.org/ftp/python/3.8.10/python-3.8.10-macos11.pkg + sudo installer -pkg /tmp/Python38.pkg -target / + sh "/Applications/Python 3.8/Install Certificates.command" + ``` Then cibuildwheel will detect that it's installed and use it instead. However, you probably don't want to build x86_64 wheels on this Python, unless you're happy with them only supporting macOS 11+.