Tidy up and correct a few things
This commit is contained in:
@@ -259,9 +259,9 @@ def setup_python(python_configuration: PythonConfiguration,
|
|||||||
# set ARCHFLAGS otherwise CPython sets it to `-arch x86_64`
|
# set ARCHFLAGS otherwise CPython sets it to `-arch x86_64`
|
||||||
env.setdefault('ARCHFLAGS', '-arch arm64 -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):
|
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
|
# needs the correct SDK selected
|
||||||
|
|
||||||
# however, different versions of Xcode contain different SDK
|
# however, different versions of Xcode contain different SDK
|
||||||
|
|||||||
+1
-1
@@ -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`.
|
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
|
!!! 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.
|
So far, only CPython 3.9 supports `universal2` and `arm64` wheels.
|
||||||
|
|
||||||
|
|||||||
@@ -186,6 +186,8 @@ Default: `auto`
|
|||||||
| macOS / Intel | `x86_64` | `x86_64`
|
| macOS / Intel | `x86_64` | `x86_64`
|
||||||
| macOS / Apple Silicon | `arm64` | `arm64` `universal2`
|
| 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
|
[setup-qemu-action]: https://github.com/docker/setup-qemu-action
|
||||||
[binfmt]: https://hub.docker.com/r/tonistiigi/binfmt
|
[binfmt]: https://hub.docker.com/r/tonistiigi/binfmt
|
||||||
|
|
||||||
|
|||||||
@@ -29,8 +29,8 @@ def get_xcode_version() -> Tuple[int, int]:
|
|||||||
def test_cross_compiled_build(tmp_path):
|
def test_cross_compiled_build(tmp_path):
|
||||||
if utils.platform != 'macos':
|
if utils.platform != 'macos':
|
||||||
pytest.skip('this test is only relevant to macos')
|
pytest.skip('this test is only relevant to macos')
|
||||||
if get_xcode_version() < (12, 0):
|
if get_xcode_version() < (12, 2):
|
||||||
pytest.skip('this test only works with Xcode 12 or greater')
|
pytest.skip('this test only works with Xcode 12.2 or greater')
|
||||||
|
|
||||||
project_dir = tmp_path / 'project'
|
project_dir = tmp_path / 'project'
|
||||||
basic_project.generate(project_dir)
|
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):
|
def test_cross_compiled_test(tmp_path, capfd, build_universal2):
|
||||||
if utils.platform != 'macos':
|
if utils.platform != 'macos':
|
||||||
pytest.skip('this test is only relevant to macos')
|
pytest.skip('this test is only relevant to macos')
|
||||||
if get_xcode_version() < (12, 0):
|
if get_xcode_version() < (12, 2):
|
||||||
pytest.skip('this test only works with Xcode 12 or greater')
|
pytest.skip('this test only works with Xcode 12.2 or greater')
|
||||||
|
|
||||||
project_dir = tmp_path / 'project'
|
project_dir = tmp_path / 'project'
|
||||||
basic_project.generate(project_dir)
|
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):
|
def test_universal2_testing(tmp_path, capfd, skip_arm64_test):
|
||||||
if utils.platform != 'macos':
|
if utils.platform != 'macos':
|
||||||
pytest.skip('this test is only relevant to macos')
|
pytest.skip('this test is only relevant to macos')
|
||||||
if get_xcode_version() < (12, 0):
|
if get_xcode_version() < (12, 2):
|
||||||
pytest.skip('this test only works with Xcode 12 or greater')
|
pytest.skip('this test only works with Xcode 12.2 or greater')
|
||||||
if platform.machine() != 'x86_64':
|
if platform.machine() != 'x86_64':
|
||||||
pytest.skip('this test only works on x86_64')
|
pytest.skip('this test only works on x86_64')
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user