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

Skip to content

CI Enable native osx-arm64 wheels on Python 3.8 #25427

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jan 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions build_tools/cirrus/arm_wheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
8 changes: 8 additions & 0 deletions build_tools/wheels/build_wheels.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down