|
7 | 7 | if [[ "$RUNNER_OS" == "macOS" ]]; then
|
8 | 8 | # Make sure to use a libomp version binary compatible with the oldest
|
9 | 9 | # supported version of the macos SDK as libomp will be vendored into the
|
10 |
| - # scikit-learn wheels for macos. The list of binaries are in |
11 |
| - # https://packages.macports.org/libomp/. |
| 10 | + # scikit-learn wheels for macos. |
| 11 | + |
12 | 12 | if [[ "$CIBW_BUILD" == *-macosx_arm64 ]]; then
|
13 | 13 | # arm64 builds must cross compile because CI is on x64
|
14 | 14 | export PYTHON_CROSSENV=1
|
15 | 15 | # SciPy requires 12.0 on arm to prevent kernel panics
|
16 | 16 | # https://github.com/scipy/scipy/issues/14688
|
17 | 17 | # We use the same deployment target to match SciPy.
|
18 | 18 | export MACOSX_DEPLOYMENT_TARGET=12.0
|
19 |
| - wget https://packages.macports.org/libomp/libomp-11.0.1_0.darwin_20.arm64.tbz2 -O libomp.tbz2 |
| 19 | + OPENMP_URL="https://anaconda.org/conda-forge/llvm-openmp/11.1.0/download/osx-arm64/llvm-openmp-11.1.0-hf3c4609_1.tar.bz2" |
20 | 20 | else
|
21 | 21 | # Currently, the oldest supported macos version is: High Sierra / 10.13.
|
22 | 22 | # Note that Darwin_17 == High Sierra / 10.13.
|
23 | 23 | export MACOSX_DEPLOYMENT_TARGET=10.13
|
24 |
| - wget https://packages.macports.org/libomp/libomp-11.0.1_0+universal.darwin_17.i386-x86_64.tbz2 -O libomp.tbz2 |
| 24 | + OPENMP_URL="https://anaconda.org/conda-forge/llvm-openmp/11.1.0/download/osx-64/llvm-openmp-11.1.0-hda6cdc1_1.tar.bz2" |
25 | 25 | fi
|
26 |
| - sudo tar -C / -xvjf libomp.tbz2 opt |
| 26 | + |
| 27 | + sudo conda create -n build $OPENMP_URL |
| 28 | + PREFIX="/usr/local/miniconda/envs/build" |
27 | 29 |
|
28 | 30 | export CC=/usr/bin/clang
|
29 | 31 | export CXX=/usr/bin/clang++
|
30 | 32 | export CPPFLAGS="$CPPFLAGS -Xpreprocessor -fopenmp"
|
31 |
| - export CFLAGS="$CFLAGS -I/opt/local/include/libomp" |
32 |
| - export CXXFLAGS="$CXXFLAGS -I/opt/local/include/libomp" |
33 |
| - export LDFLAGS="$LDFLAGS -Wl,-rpath,/opt/local/lib/libomp -L/opt/local/lib/libomp -lomp" |
| 33 | + export CFLAGS="$CFLAGS -I$PREFIX/include" |
| 34 | + export CXXFLAGS="$CXXFLAGS -I$PREFIX/include" |
| 35 | + export LDFLAGS="$LDFLAGS -Wl,-rpath,$PREFIX/lib -L$PREFIX/lib -lomp" |
34 | 36 | fi
|
35 | 37 |
|
36 | 38 | # The version of the built dependencies are specified
|
|
0 commit comments