Add SDKROOT setting for building arm64, universal2 on 10.15

This commit is contained in:
Joe Rickerby
2021-01-24 19:18:23 +00:00
parent e40d53db19
commit d21b7cfc2e
2 changed files with 6 additions and 16 deletions
-16
View File
@@ -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 }}
+6
View File
@@ -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)