From 4ced50ab17534419a9c5660977e3e8636807275d Mon Sep 17 00:00:00 2001 From: "Thomas J. Fan" Date: Wed, 18 Jan 2023 10:31:49 -0500 Subject: [PATCH 1/2] CI Enable native osx-arm64 wheels on Python 3.8 --- build_tools/cirrus/arm_wheel.yml | 3 --- build_tools/wheels/build_wheels.sh | 8 ++++++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/build_tools/cirrus/arm_wheel.yml b/build_tools/cirrus/arm_wheel.yml index 7e4f33f78116f..c5a644291c1c3 100644 --- a/build_tools/cirrus/arm_wheel.yml +++ b/build_tools/cirrus/arm_wheel.yml @@ -16,10 +16,7 @@ macos_arm64_wheel_task: CONDA_HOME: $HOME/mambaforge matrix: - env: - # cibuildwheel can not test on Python 3.8 even on a Apple Silicon machine. - # For details see: https://github.com/pypa/cibuildwheel/pull/1169 CIBW_BUILD: cp38-macosx_arm64 - CIBW_TEST_SKIP: "*" - env: CIBW_BUILD: cp39-macosx_arm64 - env: diff --git a/build_tools/wheels/build_wheels.sh b/build_tools/wheels/build_wheels.sh index faa278714b2fd..bea9218b3826c 100755 --- a/build_tools/wheels/build_wheels.sh +++ b/build_tools/wheels/build_wheels.sh @@ -35,6 +35,14 @@ if [[ $(uname) == "Darwin" ]]; then export CFLAGS="$CFLAGS -I$PREFIX/include" export CXXFLAGS="$CXXFLAGS -I$PREFIX/include" export LDFLAGS="$LDFLAGS -Wl,-rpath,$PREFIX/lib -L$PREFIX/lib -lomp" + + if [[ $(uname -m) == "arm64" && "$CIBW_BUILD" == "cp38-macosx_arm64" ]]; then + # Enables native building and testing for macosx arm on Python 3.8. For details see: + # https://cibuildwheel.readthedocs.io/en/stable/faq/#macos-building-cpython-38-wheels-on-arm64 + curl -o /tmp/Python38.pkg https://www.python.org/ftp/python/3.8.10/python-3.8.10-macos11.pkg + sudo installer -pkg /tmp/Python38.pkg -target / + sh "/Applications/Python 3.8/Install Certificates.command" + fi fi # The version of the built dependencies are specified From 9cfa32549a8c4920162a63a44da92a47416a768e Mon Sep 17 00:00:00 2001 From: "Thomas J. Fan" Date: Wed, 18 Jan 2023 10:32:19 -0500 Subject: [PATCH 2/2] CI [cd build cirrus]