From c5084cf2f48242a4f2acc6091b27a27629c2410f Mon Sep 17 00:00:00 2001 From: Anas Khan <83116240+anxkhn@users.noreply.github.com> Date: Mon, 27 Jul 2026 23:18:53 +0530 Subject: [PATCH] GH-50531: [Python][Packaging] Set macOS deployment target before wheel tag Set the default MACOSX_DEPLOYMENT_TARGET before deriving _PYTHON_HOST_PLATFORM so local builds without an explicit target produce a valid platform tag. Preserve explicit deployment targets unchanged. Signed-off-by: Anas Khan <83116240+anxkhn@users.noreply.github.com> --- ci/scripts/python_wheel_macos_build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/scripts/python_wheel_macos_build.sh b/ci/scripts/python_wheel_macos_build.sh index a9afd9127296..b931dfa4dd23 100755 --- a/ci/scripts/python_wheel_macos_build.sh +++ b/ci/scripts/python_wheel_macos_build.sh @@ -33,8 +33,8 @@ rm -rf "${source_dir}"/python/pyarrow/*.so rm -rf "${source_dir}"/python/pyarrow/*.so.* echo "=== (${PYTHON_VERSION}) Set SDK, C++ and Wheel flags ===" -export _PYTHON_HOST_PLATFORM="macosx-${MACOSX_DEPLOYMENT_TARGET}-${arch}" export MACOSX_DEPLOYMENT_TARGET="${MACOSX_DEPLOYMENT_TARGET:-12.0}" +export _PYTHON_HOST_PLATFORM="macosx-${MACOSX_DEPLOYMENT_TARGET}-${arch}" export SDKROOT="${SDKROOT:-$(xcrun --sdk macosx --show-sdk-path)}" if [ "$arch" = "arm64" ]; then