From d21b7cfc2ec472b61567092b8b4612514b6a6145 Mon Sep 17 00:00:00 2001 From: Joe Rickerby Date: Sun, 24 Jan 2021 19:18:23 +0000 Subject: [PATCH] Add SDKROOT setting for building arm64, universal2 on 10.15 --- .github/workflows/tinkering.yml | 16 ---------------- cibuildwheel/macos.py | 6 ++++++ 2 files changed, 6 insertions(+), 16 deletions(-) delete mode 100644 .github/workflows/tinkering.yml diff --git a/.github/workflows/tinkering.yml b/.github/workflows/tinkering.yml deleted file mode 100644 index 43f632a2..00000000 --- a/.github/workflows/tinkering.yml +++ /dev/null @@ -1,16 +0,0 @@ -name: Manual Tinkering - -on: - pull_request: - -jobs: - ssh: - runs-on: macos-latest - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 - - name: Start SSH session - uses: luchihoratiu/debug-via-ssh@main - with: - NGROK_AUTH_TOKEN: ${{ secrets.JOERICK_NGROK_AUTH_TOKEN }} - SSH_PASS: ${{ secrets.JOERICK_NGROK_SSH_PASS }} diff --git a/cibuildwheel/macos.py b/cibuildwheel/macos.py index dd1a8743..00aca372 100644 --- a/cibuildwheel/macos.py +++ b/cibuildwheel/macos.py @@ -240,6 +240,12 @@ def setup_python(python_configuration: PythonConfiguration, env.setdefault('_PYTHON_HOST_PLATFORM', 'macosx-11.0-arm64') env.setdefault('ARCHFLAGS', '-arch arm64') + 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 + # needs the correct SDK selected + env.setdefault('SDKROOT', 'macosx11.0') + log.step('Installing build tools...') call(['pip', 'install', '--upgrade', 'setuptools', 'wheel', 'delocate', *dependency_constraint_flags], env=env)