Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 134c492

Browse files
thomasjpfanogrisel
andauthored
CI Enable native osx-arm64 wheels on Python 3.8 (#25427)
[cd build cirrus] Co-authored-by: Olivier Grisel <[email protected]>
1 parent eb8d45e commit 134c492

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

build_tools/cirrus/arm_wheel.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,7 @@ macos_arm64_wheel_task:
1616
CONDA_HOME: $HOME/mambaforge
1717
matrix:
1818
- env:
19-
# cibuildwheel can not test on Python 3.8 even on a Apple Silicon machine.
20-
# For details see: https://github.com/pypa/cibuildwheel/pull/1169
2119
CIBW_BUILD: cp38-macosx_arm64
22-
CIBW_TEST_SKIP: "*"
2320
- env:
2421
CIBW_BUILD: cp39-macosx_arm64
2522
- env:

build_tools/wheels/build_wheels.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,14 @@ if [[ $(uname) == "Darwin" ]]; then
3535
export CFLAGS="$CFLAGS -I$PREFIX/include"
3636
export CXXFLAGS="$CXXFLAGS -I$PREFIX/include"
3737
export LDFLAGS="$LDFLAGS -Wl,-rpath,$PREFIX/lib -L$PREFIX/lib -lomp"
38+
39+
if [[ $(uname -m) == "arm64" && "$CIBW_BUILD" == "cp38-macosx_arm64" ]]; then
40+
# Enables native building and testing for macosx arm on Python 3.8. For details see:
41+
# https://cibuildwheel.readthedocs.io/en/stable/faq/#macos-building-cpython-38-wheels-on-arm64
42+
curl -o /tmp/Python38.pkg https://www.python.org/ftp/python/3.8.10/python-3.8.10-macos11.pkg
43+
sudo installer -pkg /tmp/Python38.pkg -target /
44+
sh "/Applications/Python 3.8/Install Certificates.command"
45+
fi
3846
fi
3947

4048
# The version of the built dependencies are specified

0 commit comments

Comments
 (0)