From ac41342d7e5225625f05f057d880643896c70dc9 Mon Sep 17 00:00:00 2001 From: Yunze Xu Date: Thu, 23 Jan 2025 23:31:11 +0800 Subject: [PATCH 1/3] Set the minimum macOS version to 13 --- pkg/mac/build-mac-wheels.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/mac/build-mac-wheels.sh b/pkg/mac/build-mac-wheels.sh index 2aea1de..296b15a 100755 --- a/pkg/mac/build-mac-wheels.sh +++ b/pkg/mac/build-mac-wheels.sh @@ -99,7 +99,8 @@ if [ ! -f Python-${PYTHON_VERSION_LONG}/.done ]; then tar xfz Python-${PYTHON_VERSION_LONG}.tgz pushd Python-${PYTHON_VERSION_LONG} - ./configure --prefix=$PREFIX --enable-shared --enable-universalsdk --with-universal-archs=universal2 --with-openssl=$PREFIX + CFLAGS="-fPIC -O3 -mmacosx-version-min=${MACOSX_DEPLOYMENT_TARGET}" \ + ./configure --prefix=$PREFIX --enable-shared --enable-universalsdk --with-universal-archs=universal2 --with-openssl=$PREFIX make -j16 make install From 910e4987bdc7a00a77ee7a213fb05ecaaf3cf24f Mon Sep 17 00:00:00 2001 From: Yunze Xu Date: Thu, 23 Jan 2025 23:37:14 +0800 Subject: [PATCH 2/3] fix the upload-artifact plugin --- .github/workflows/ci-build-release-wheels.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci-build-release-wheels.yaml b/.github/workflows/ci-build-release-wheels.yaml index 1d41ec2..3909efa 100644 --- a/.github/workflows/ci-build-release-wheels.yaml +++ b/.github/workflows/ci-build-release-wheels.yaml @@ -87,7 +87,7 @@ jobs: /pulsar-client-python/pkg/test-wheel.sh - name: Upload artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: wheel-${{matrix.image.name}}-py${{matrix.python.version}}-${{matrix.cpu.platform}} path: wheelhouse/*.whl @@ -115,7 +115,7 @@ jobs: run: pkg/mac/build-mac-wheels.sh ${{matrix.py.version}} ${{matrix.py.version_long}} - name: Upload artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: wheel-mac-py${{matrix.py.version}} path: dist/*.whl @@ -179,7 +179,7 @@ jobs: python -c 'import pulsar; c = pulsar.Client("pulsar://localhost:6650"); c.close()' - name: Upload artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: wheel-windows-py${{matrix.python.version}} path: dist/*.whl From 0972979b23700ff121936b3a0a1d12b3bf5f4462 Mon Sep 17 00:00:00 2001 From: Yunze Xu Date: Thu, 23 Jan 2025 23:53:34 +0800 Subject: [PATCH 3/3] Use MACOSX_DEPLOYMENT_TARGET to specify mmacosx-version-min --- pkg/mac/build-mac-wheels.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pkg/mac/build-mac-wheels.sh b/pkg/mac/build-mac-wheels.sh index 296b15a..cd068a3 100755 --- a/pkg/mac/build-mac-wheels.sh +++ b/pkg/mac/build-mac-wheels.sh @@ -52,7 +52,8 @@ fi PYTHON_VERSION=$1 PYTHON_VERSION_LONG=$2 -MACOSX_DEPLOYMENT_TARGET=13 +# When building Python from source, it will read this environment variable to determine the minimum supported macOS version +export MACOSX_DEPLOYMENT_TARGET=13 pushd $CACHE_DIR # We need to build OpenSSL from source to have universal2 binaries @@ -99,8 +100,8 @@ if [ ! -f Python-${PYTHON_VERSION_LONG}/.done ]; then tar xfz Python-${PYTHON_VERSION_LONG}.tgz pushd Python-${PYTHON_VERSION_LONG} - CFLAGS="-fPIC -O3 -mmacosx-version-min=${MACOSX_DEPLOYMENT_TARGET}" \ - ./configure --prefix=$PREFIX --enable-shared --enable-universalsdk --with-universal-archs=universal2 --with-openssl=$PREFIX + export CFLAGS="-fPIC -O3" + ./configure --prefix=$PREFIX --enable-shared --enable-universalsdk --with-universal-archs=universal2 --with-openssl=$PREFIX make -j16 make install