Skip to content

Commit 0972979

Browse files
committed
Use MACOSX_DEPLOYMENT_TARGET to specify mmacosx-version-min
1 parent 910e498 commit 0972979

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

pkg/mac/build-mac-wheels.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ fi
5252
PYTHON_VERSION=$1
5353
PYTHON_VERSION_LONG=$2
5454

55-
MACOSX_DEPLOYMENT_TARGET=13
55+
# When building Python from source, it will read this environment variable to determine the minimum supported macOS version
56+
export MACOSX_DEPLOYMENT_TARGET=13
5657
pushd $CACHE_DIR
5758

5859
# We need to build OpenSSL from source to have universal2 binaries
@@ -99,8 +100,8 @@ if [ ! -f Python-${PYTHON_VERSION_LONG}/.done ]; then
99100
tar xfz Python-${PYTHON_VERSION_LONG}.tgz
100101

101102
pushd Python-${PYTHON_VERSION_LONG}
102-
CFLAGS="-fPIC -O3 -mmacosx-version-min=${MACOSX_DEPLOYMENT_TARGET}" \
103-
./configure --prefix=$PREFIX --enable-shared --enable-universalsdk --with-universal-archs=universal2 --with-openssl=$PREFIX
103+
export CFLAGS="-fPIC -O3"
104+
./configure --prefix=$PREFIX --enable-shared --enable-universalsdk --with-universal-archs=universal2 --with-openssl=$PREFIX
104105
make -j16
105106
make install
106107

0 commit comments

Comments
 (0)