diff --git a/cibuildwheel/macos.py b/cibuildwheel/macos.py index 42c76251..e477bece 100644 --- a/cibuildwheel/macos.py +++ b/cibuildwheel/macos.py @@ -259,9 +259,9 @@ def setup_python(python_configuration: PythonConfiguration, # set ARCHFLAGS otherwise CPython sets it to `-arch x86_64` env.setdefault('ARCHFLAGS', '-arch arm64 -arch x86_64') - if python_configuration.identifier.endswith('_arm64') or python_configuration.identifier.endswith('_universal2'): + if python_configuration.identifier.endswith('arm64') or python_configuration.identifier.endswith('universal2'): if get_macos_version() < (10, 16): - # xcode 12 or higher can build arm64 on macos 10.15 or below, but + # xcode 12.2 or higher can build arm64 on macos 10.15 or below, but # needs the correct SDK selected # however, different versions of Xcode contain different SDK diff --git a/docs/faq.md b/docs/faq.md index da8bc522..95a99be9 100644 --- a/docs/faq.md +++ b/docs/faq.md @@ -58,7 +58,7 @@ These wheels are not built by default, but can be enabled by setting the [`CIBW_ Hopefully, this is a temporary situation. Once we have widely available Apple Silicon CI runners, we can build and test `arm64` and `universal2` wheels more natively. That's why `universal2` wheels are not yet built by default, and require opt-in by setting `CIBW_ARCHS_MACOS`. !!! note - Your runner image needs Xcode Command Line Tools 12 or later to build `universal2` and `arm64`. + Your runner image needs Xcode Command Line Tools 12.2 or later to build `universal2` and `arm64`. So far, only CPython 3.9 supports `universal2` and `arm64` wheels. diff --git a/docs/options.md b/docs/options.md index f255cf28..dc46a110 100644 --- a/docs/options.md +++ b/docs/options.md @@ -186,6 +186,8 @@ Default: `auto` | macOS / Intel | `x86_64` | `x86_64` | macOS / AppleĀ Silicon | `arm64` | `arm64` `universal2` +If not listed above, `auto` is the same as `native`. + [setup-qemu-action]: https://github.com/docker/setup-qemu-action [binfmt]: https://hub.docker.com/r/tonistiigi/binfmt diff --git a/test/test_macos_archs.py b/test/test_macos_archs.py index bd26a42e..de2ada1c 100644 --- a/test/test_macos_archs.py +++ b/test/test_macos_archs.py @@ -29,8 +29,8 @@ def get_xcode_version() -> Tuple[int, int]: def test_cross_compiled_build(tmp_path): if utils.platform != 'macos': pytest.skip('this test is only relevant to macos') - if get_xcode_version() < (12, 0): - pytest.skip('this test only works with Xcode 12 or greater') + if get_xcode_version() < (12, 2): + pytest.skip('this test only works with Xcode 12.2 or greater') project_dir = tmp_path / 'project' basic_project.generate(project_dir) @@ -48,8 +48,8 @@ def test_cross_compiled_build(tmp_path): def test_cross_compiled_test(tmp_path, capfd, build_universal2): if utils.platform != 'macos': pytest.skip('this test is only relevant to macos') - if get_xcode_version() < (12, 0): - pytest.skip('this test only works with Xcode 12 or greater') + if get_xcode_version() < (12, 2): + pytest.skip('this test only works with Xcode 12.2 or greater') project_dir = tmp_path / 'project' basic_project.generate(project_dir) @@ -87,8 +87,8 @@ def test_cross_compiled_test(tmp_path, capfd, build_universal2): def test_universal2_testing(tmp_path, capfd, skip_arm64_test): if utils.platform != 'macos': pytest.skip('this test is only relevant to macos') - if get_xcode_version() < (12, 0): - pytest.skip('this test only works with Xcode 12 or greater') + if get_xcode_version() < (12, 2): + pytest.skip('this test only works with Xcode 12.2 or greater') if platform.machine() != 'x86_64': pytest.skip('this test only works on x86_64')