From b4c68c920d4804eaa0fef53b78f12cafd6343a99 Mon Sep 17 00:00:00 2001 From: 97littleleaf11 <97littleleaf11@gmail.com> Date: Sat, 27 Feb 2021 06:59:24 +0800 Subject: [PATCH] Add Apple Silicon support when building wheels --- misc/build_wheel.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/misc/build_wheel.py b/misc/build_wheel.py index 13633405bf774..bf27f11d2c256 100644 --- a/misc/build_wheel.py +++ b/misc/build_wheel.py @@ -45,6 +45,13 @@ def create_environ(python_version: str) -> Dict[str, str]: # Don't build 32-bit wheels env['CIBW_SKIP'] = "*-manylinux_i686 *-win32" + # Apple Silicon support + # When cross-compiling on Intel, it is not possible to test arm64 and + # the arm64 part of a universal2 wheel. Warnings will be silenced with + # following CIBW_TEST_SKIP + env['CIBW_ARCHS_MACOS'] = "x86_64 arm64" + env['CIBW_TEST_SKIP'] = "*-macosx_arm64" + env['CIBW_BUILD_VERBOSITY'] = '1' # mypy's isolated builds don't specify the requirements mypyc needs, so install