Skip to content

Commit

Permalink
[Python] Use MacOS 10.15 as the target OS version for Python wheel fi…
Browse files Browse the repository at this point in the history
…les (#15788)

### Motivation

To get broader compatibility for Python wheel files on Mac, we can target MacOS 10.15 instead of 11.0.
  • Loading branch information
merlimat authored May 26, 2022
1 parent b72d93e commit efe57bf
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions python/build-mac-wheels.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ PYTHON_VERSIONS=(
'3.10 3.10.2'
)

export MACOSX_DEPLOYMENT_TARGET=11.0
export MACOSX_DEPLOYMENT_TARGET=10.15
MACOSX_DEPLOYMENT_TARGET_MAJOR=${MACOSX_DEPLOYMENT_TARGET%%.*}

ZLIB_VERSION=1.2.12
Expand Down Expand Up @@ -275,18 +275,16 @@ for line in "${PYTHON_VERSIONS[@]}"; do
ARCHS='x86_64'
fi

set -x
cmake . \
-DCMAKE_OSX_ARCHITECTURES=${ARCHS} \
-DCMAKE_OSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET} \
-DCMAKE_OSX_SYSROOT=/Library/Developer/CommandLineTools/SDKs/MacOSX${MACOSX_DEPLOYMENT_TARGET_MAJOR}.sdk \
-DCMAKE_INSTALL_PREFIX=$PREFIX \
-DCMAKE_INSTALL_LIBDIR=$PREFIX/lib \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_PREFIX_PATH=$PREFIX \
-DCMAKE_CXX_FLAGS=-I$PREFIX/include \
-DCMAKE_FIND_FRAMEWORK=$PREFIX \
-DBoost_INCLUDE_DIR=$CACHE_DIR/boost-py-$PYTHON_VERSION/include \
-DBoost_LIBRARY_DIRS=$CACHE_DIR/boost-py-$PYTHON_VERSION/lib \
-DBoost_LIBRARY_DIR=$CACHE_DIR/boost-py-$PYTHON_VERSION/lib \
-DPYTHON_INCLUDE_DIR=$PY_INCLUDE_DIR \
-DPYTHON_LIBRARY=$PY_PREFIX/lib/libpython${PYTHON_VERSION}.dylib \
-DLINK_STATIC=ON \
Expand Down

0 comments on commit efe57bf

Please sign in to comment.