Skip to content

Commit

Permalink
MAINT: PR 20632 revisions [wheel build]
Browse files Browse the repository at this point in the history
* Changes needed to get MacOS ARM wheels building
again, based on debug work on my fork.

[wheel build]
  • Loading branch information
tylerjereddy committed May 21, 2024
1 parent aa32933 commit e7abaf1
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,21 +128,16 @@ jobs:
run: |
if [[ ${{ matrix.buildplat[2] }} == 'arm64' ]]; then
# macosx_arm64
# use homebrew gfortran
LIB_PATH=$LIB_PATH:/opt/arm64-builds/lib
sudo xcode-select -s /Applications/Xcode_15.2.app
# for some reason gfortran is not on the path
GFORTRAN_LOC=$(brew --prefix gfortran)/bin/gfortran
ln -s $GFORTRAN_LOC gfortran
export PATH=$PWD:$PATH
echo "PATH=$PATH" >> "$GITHUB_ENV"
# location of the gfortran's libraries
GFORTRAN_LIB=$(dirname `gfortran --print-file-name libgfortran.dylib`)
GFORTRAN_LIB="\$(dirname \$(gfortran --print-file-name libgfortran.dylib))"
CIBW="MACOSX_DEPLOYMENT_TARGET=12.0\
MACOS_DEPLOYMENT_TARGET=12.0\
LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH\
LD_LIBRARY_PATH=$LIB_PATH:$LD_LIBRARY_PATH\
SDKROOT=$(xcrun --sdk macosx --show-sdk-path)\
_PYTHON_HOST_PLATFORM=macosx-12.0-arm64\
PKG_CONFIG_PATH=/opt/arm64-builds/lib/pkgconfig"
echo "CIBW_ENVIRONMENT_MACOS=$CIBW" >> "$GITHUB_ENV"
Expand All @@ -152,8 +147,8 @@ jobs:
echo "REPAIR_PATH=/opt/arm64-builds/lib" >> "$GITHUB_ENV"
CIBW="DYLD_LIBRARY_PATH=$GFORTRAN_LIB:/opt/arm64-builds/lib delocate-listdeps {wheel} &&\
DYLD_LIBRARY_PATH=$GFORTRAN_LIB:/opt/arm64-builds/lib delocate-wheel --require-archs {delocate_archs} -w {dest_dir} {wheel}"
CIBW="DYLD_LIBRARY_PATH=$GFORTRAN_LIB:$LIB_PATH delocate-listdeps {wheel} &&\
DYLD_LIBRARY_PATH=$GFORTRAN_LIB:$LIB_PATH delocate-wheel --require-archs {delocate_archs} -w {dest_dir} {wheel}"
echo "CIBW_REPAIR_WHEEL_COMMAND_MACOS=$CIBW" >> "$GITHUB_ENV"
else
Expand Down

0 comments on commit e7abaf1

Please sign in to comment.