Skip to content

Commit 5161d93

Browse files
Add Apple Silicon support when building wheels (#10145)
related to #10114
1 parent 72ac2ce commit 5161d93

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

misc/build_wheel.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,13 @@ def create_environ(python_version: str) -> Dict[str, str]:
4545
# Don't build 32-bit wheels
4646
env['CIBW_SKIP'] = "*-manylinux_i686 *-win32"
4747

48+
# Apple Silicon support
49+
# When cross-compiling on Intel, it is not possible to test arm64 and
50+
# the arm64 part of a universal2 wheel. Warnings will be silenced with
51+
# following CIBW_TEST_SKIP
52+
env['CIBW_ARCHS_MACOS'] = "x86_64 arm64"
53+
env['CIBW_TEST_SKIP'] = "*-macosx_arm64"
54+
4855
env['CIBW_BUILD_VERBOSITY'] = '1'
4956

5057
# mypy's isolated builds don't specify the requirements mypyc needs, so install

0 commit comments

Comments
 (0)