BLD Fixes OSX wheel build
@@ -7,19 +7,20 @@ set -x
if [[ "$RUNNER_OS" == "macOS" ]]; then
# Make sure to use a libomp version binary compatible with the oldest
# supported version of the macos SDK as libomp will be vendored into the
- # scikit-learn wheels for macos. The list of bottles can be found at:
- # https://formulae.brew.sh/api/formula/libomp.json. Currently, the oldest
+ # scikit-learn wheels for macos. The list of binaries are in
+ # https://packages.macports.org/libomp/. Currently, the oldest
# supported macos version is: High Sierra / 10.13. When upgrading this, be
# sure to update the MACOSX_DEPLOYMENT_TARGET environment variable in
- # wheels.yml accordingly.
- wget https://homebrew.bintray.com/bottles/libomp-11.0.0.high_sierra.bottle.tar.gz
- brew install libomp-11.0.0.high_sierra.bottle.tar.gz
+ # wheels.yml accordingly. Note that Darwin_17 == High Sierra / 10.13.
+ wget https://packages.macports.org/libomp/libomp-12.0.0_0+universal.darwin_17.i386-x86_64.tbz2 -O libomp.tbz2
+ sudo tar -C / -xvjf libomp.tbz2 opt
+
export CC=/usr/bin/clang
export CXX=/usr/bin/clang++
export CPPFLAGS="$CPPFLAGS -Xpreprocessor -fopenmp"
- export CFLAGS="$CFLAGS -I/usr/local/opt/libomp/include"
- export CXXFLAGS="$CXXFLAGS -I/usr/local/opt/libomp/include"
- export LDFLAGS="$LDFLAGS -Wl,-rpath,/usr/local/opt/libomp/lib -L/usr/local/opt/libomp/lib -lomp"
+ export CFLAGS="$CFLAGS -I/opt/local/include/libomp"
+ export CXXFLAGS="$CXXFLAGS -I/opt/local/include/libomp"
+ export LDFLAGS="$LDFLAGS -Wl,-rpath,/opt/local/lib/libomp -L/opt/local/lib/libomp -lomp"
fi
# The version of the built dependencies are specified
