Skip to content

GH-50531: [Python][Packaging] Set macOS deployment target before building wheel platform tag - #50377

Open
anxkhn wants to merge 1 commit into
apache:mainfrom
anxkhn:fix/macos-wheel-deployment-target-order
Open

GH-50531: [Python][Packaging] Set macOS deployment target before building wheel platform tag#50377
anxkhn wants to merge 1 commit into
apache:mainfrom
anxkhn:fix/macos-wheel-deployment-target-order

Conversation

@anxkhn

@anxkhn anxkhn commented Jul 5, 2026

Copy link
Copy Markdown

Rationale for this change

ci/scripts/python_wheel_macos_build.sh derives _PYTHON_HOST_PLATFORM from MACOSX_DEPLOYMENT_TARGET before applying its default. Without an exported target, it produces macosx--<arch> even though the build then targets macOS 12.0.

What changes are included in this PR?

Apply the deployment target default before deriving the wheel platform tag. The rebase preserves the intervening shell quoting cleanup on main.

Are these changes tested?

bash -n and git diff --check pass. Targeted shell checks produce macosx-12.0-x86_64 when unset and preserve an explicit 13.0 target. A full wheel build was not run.

Are there any user-facing changes?

No API changes. Manual or local wheel builds that rely on the default now receive a valid platform tag.

This change was made with help from an AI coding assistant. I reviewed and verified the one-line ordering fix.

Copilot AI review requested due to automatic review settings July 5, 2026 21:42
@github-actions

github-actions Bot commented Jul 5, 2026

Copy link
Copy Markdown

Thanks for opening a pull request!

If this is not a minor PR. Could you open an issue for this pull request on GitHub? https://github.com/apache/arrow/issues/new/choose

Opening GitHub issues ahead of time contributes to the Openness of the Apache Arrow project.

Then could you also rename the pull request title in the following format?

GH-${GITHUB_ISSUE_ID}: [${COMPONENT}] ${SUMMARY}

or

MINOR: [${COMPONENT}] ${SUMMARY}

See also:

@github-actions github-actions Bot added the awaiting review Awaiting review label Jul 5, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes a macOS wheel packaging issue where _PYTHON_HOST_PLATFORM could be derived from an unset MACOSX_DEPLOYMENT_TARGET, producing a malformed wheel platform tag during manual/local builds.

Changes:

  • Set MACOSX_DEPLOYMENT_TARGET (with its default) before exporting _PYTHON_HOST_PLATFORM so the platform tag is always derived from the resolved value.

@kou
kou marked this pull request as draft July 6, 2026 00:58
@kou

kou commented Jul 6, 2026

Copy link
Copy Markdown
Member

Could you open an issue for this.
See also: https://github.com/apache/arrow/blob/main/CONTRIBUTING.md#Minor-Fixes

@anxkhn anxkhn changed the title [Python][Packaging] Set MACOSX_DEPLOYMENT_TARGET default before building wheel platform tag GH-50531: [Python][Packaging] Set macOS deployment target before building wheel platform tag Jul 17, 2026
@anxkhn

anxkhn commented Jul 17, 2026

Copy link
Copy Markdown
Author

Opened #50531 as requested and updated this PR title and description to link it and follow the contribution format. Thank you for pointing me to the minor-fix policy.

@github-actions

Copy link
Copy Markdown

⚠️ GitHub issue #50531 has been automatically assigned in GitHub to PR creator.

@anxkhn
anxkhn force-pushed the fix/macos-wheel-deployment-target-order branch from fe42499 to a3b3ef1 Compare July 17, 2026 16:34
…e 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>
@anxkhn
anxkhn force-pushed the fix/macos-wheel-deployment-target-order branch from a3b3ef1 to c5084cf Compare July 27, 2026 17:51
@anxkhn

anxkhn commented Jul 27, 2026

Copy link
Copy Markdown
Author

Pushed a revision addressing the latest review/CI feedback.

@anxkhn

anxkhn commented Jul 27, 2026

Copy link
Copy Markdown
Author

rebased onto current main and resolved the conflict by preserving the upstream shell quoting cleanup while keeping the deployment-target default before platform-tag construction. syntax and unset/explicit target checks pass, and the commit is signed and signed off. @kou could you please re-review?

@kou
kou marked this pull request as ready for review July 28, 2026 01:18
Copilot AI review requested due to automatic review settings July 28, 2026 01:18

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@kou

kou commented Jul 28, 2026

Copy link
Copy Markdown
Member

@github-actions crossbow submit -g wheel

@github-actions

Copy link
Copy Markdown

Revision: c5084cf

Submitted crossbow builds: ursacomputing/crossbow @ actions-31644df33f

Task Status
python-sdist GitHub Actions
wheel-macos-monterey-cp311-cp311-amd64 GitHub Actions
wheel-macos-monterey-cp311-cp311-arm64 GitHub Actions
wheel-macos-monterey-cp312-cp312-amd64 GitHub Actions
wheel-macos-monterey-cp312-cp312-arm64 GitHub Actions
wheel-macos-monterey-cp313-cp313-amd64 GitHub Actions
wheel-macos-monterey-cp313-cp313-arm64 GitHub Actions
wheel-macos-monterey-cp314-cp314-amd64 GitHub Actions
wheel-macos-monterey-cp314-cp314-arm64 GitHub Actions
wheel-macos-monterey-cp314-cp314t-amd64 GitHub Actions
wheel-macos-monterey-cp314-cp314t-arm64 GitHub Actions
wheel-manylinux-2-28-cp311-cp311-amd64 GitHub Actions
wheel-manylinux-2-28-cp311-cp311-arm64 GitHub Actions
wheel-manylinux-2-28-cp312-cp312-amd64 GitHub Actions
wheel-manylinux-2-28-cp312-cp312-arm64 GitHub Actions
wheel-manylinux-2-28-cp313-cp313-amd64 GitHub Actions
wheel-manylinux-2-28-cp313-cp313-arm64 GitHub Actions
wheel-manylinux-2-28-cp314-cp314-amd64 GitHub Actions
wheel-manylinux-2-28-cp314-cp314-arm64 GitHub Actions
wheel-manylinux-2-28-cp314-cp314t-amd64 GitHub Actions
wheel-manylinux-2-28-cp314-cp314t-arm64 GitHub Actions
wheel-musllinux-1-2-cp311-cp311-amd64 GitHub Actions
wheel-musllinux-1-2-cp311-cp311-arm64 GitHub Actions
wheel-musllinux-1-2-cp312-cp312-amd64 GitHub Actions
wheel-musllinux-1-2-cp312-cp312-arm64 GitHub Actions
wheel-musllinux-1-2-cp313-cp313-amd64 GitHub Actions
wheel-musllinux-1-2-cp313-cp313-arm64 GitHub Actions
wheel-musllinux-1-2-cp314-cp314-amd64 GitHub Actions
wheel-musllinux-1-2-cp314-cp314-arm64 GitHub Actions
wheel-musllinux-1-2-cp314-cp314t-amd64 GitHub Actions
wheel-musllinux-1-2-cp314-cp314t-arm64 GitHub Actions
wheel-windows-cp311-cp311-amd64 GitHub Actions
wheel-windows-cp312-cp312-amd64 GitHub Actions
wheel-windows-cp313-cp313-amd64 GitHub Actions
wheel-windows-cp314-cp314-amd64 GitHub Actions
wheel-windows-cp314-cp314t-amd64 GitHub Actions

@raulcd raulcd left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@anxkhn it seems that part of the responses are LLM generated, like the description on the PR. In the description at the Are these changes tested? section the response is quite useless, what does it mean for git diff --check to pass? how is that useful or relevant info for the changes on this PR? Please, could you review.

bash -n and git diff --check pass. Targeted shell checks produce macosx-12.0-x86_64 when unset and preserve an explicit 13.0 target. A full wheel build was not run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting review Awaiting review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants