Skip to content

Commit

Permalink
trying to set MACOSX_DEPLOYMENT_TARGET
Browse files Browse the repository at this point in the history
  • Loading branch information
Socrats committed Mar 13, 2023
1 parent 7c93c48 commit af08125
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 7 deletions.
8 changes: 1 addition & 7 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,13 +131,7 @@ jobs:
CIBW_ARCHS_MACOS: "x86_64 arm64 universal2"
CIBW_ARCHS_WINDOWS: "AMD64 x86"
CIBW_BEFORE_ALL: pip install --upgrade pip
CIBW_BEFORE_BUILD_MACOS: |
brew install eigen
brew install gfortran
brew install openblas
brew install libomp
brew install boost
# CIBW_BEFORE_BUILD_MACOS: bash build_tools/github/before_all_mac.sh
CIBW_BEFORE_BUILD_MACOS: bash build_tools/github/before_build_mac.sh
CIBW_BEFORE_ALL_LINUX: bash build_tools/github/download_eigen3.sh
CIBW_BEFORE_ALL_WINDOWS: bash build_tools/github/download_eigen3_windows.sh
CIBW_ENVIRONMENT: CMAKE_BUILD_PARALLEL_LEVEL=2
Expand Down
22 changes: 22 additions & 0 deletions build_tools/github/before_build_mac.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/bash

# Code copied from scikit-learn

set -e
set -x

brew install eigen
brew install gfortran
brew install openblas
brew install libomp
brew install boost

if [[ $(uname) == "Darwin" ]]; then
if [[ "$CIBW_BUILD" == *-macosx_arm64 || "$CIBW_BUILD" == *-macosx_universal2 ]]; then
export MACOSX_DEPLOYMENT_TARGET=12.0
export EGTTOOLS_EXTRA_CMAKE_ARGS='-DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=12.0'
else
export MACOSX_DEPLOYMENT_TARGET=10.9
export EGTTOOLS_EXTRA_CMAKE_ARGS='-DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.9'
fi
fi

0 comments on commit af08125

Please sign in to comment.