Skip to content

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

Merged
raulcd merged 1 commit into
apache:mainfrom
anxkhn:fix/macos-wheel-deployment-target-order
Aug 13, 2026
Merged

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

Conversation

@anxkhn

@anxkhn anxkhn commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Rationale for this change

ci/scripts/python_wheel_macos_build.sh builds _PYTHON_HOST_PLATFORM from MACOSX_DEPLOYMENT_TARGET before the script applies its default of 12.0. When the variable is unset, the tag becomes macosx--<arch> even though the rest of the build still targets macOS 12.0.

What changes are included in this PR?

Move the deployment-target default above the platform-tag export so the tag always uses the resolved value. An explicit MACOSX_DEPLOYMENT_TARGET is still honored.

Are these changes tested?

I checked the two host-platform outcomes from the same assignment the script uses:

  • unset MACOSX_DEPLOYMENT_TARGET yields macosx-12.0-x86_64
  • MACOSX_DEPLOYMENT_TARGET=13.0 yields macosx-13.0-x86_64

Crossbow macOS wheel jobs were also submitted on this branch after the rebase.

Are there any user-facing changes?

No public API change. Local or manual macOS wheels that rely on the default now get a valid platform tag instead of macosx--<arch>.

Copilot AI lite 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
@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
@anxkhn
anxkhn force-pushed the fix/macos-wheel-deployment-target-order branch from a3b3ef1 to c5084cf Compare July 27, 2026 17:51
@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.

@anxkhn

anxkhn commented Aug 13, 2026

Copy link
Copy Markdown
Contributor Author

@raulcd rewrote the testing section to report only the host-platform checks and the crossbow wheel run. the git-diff-check note is gone.

@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.

The current CI failures are gone on main, could you rebase?

…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 commented Aug 13, 2026

Copy link
Copy Markdown
Contributor Author

@raulcd rebased onto current main. the macos deployment-target default still lands before the platform tag.

Copilot AI review requested due to automatic review settings August 13, 2026 08:32
@anxkhn
anxkhn force-pushed the fix/macos-wheel-deployment-target-order branch from c5084cf to f028434 Compare August 13, 2026 08:32

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

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

@raulcd

raulcd commented Aug 13, 2026

Copy link
Copy Markdown
Member

@github-actions crossbow submit wheel-macos-*

@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.

Thanks for the PR, I will merge once wheels are green.

@github-actions github-actions Bot added awaiting merge Awaiting merge and removed awaiting review Awaiting review labels Aug 13, 2026
@github-actions

Copy link
Copy Markdown

Revision: f028434

Submitted crossbow builds: ursacomputing/crossbow @ actions-1f1f8ae178

Task Status
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

@raulcd
raulcd merged commit 8e7a1f9 into apache:main Aug 13, 2026
40 checks passed
@raulcd raulcd removed the awaiting merge Awaiting merge label Aug 13, 2026
@conbench-apache-arrow

Copy link
Copy Markdown

After merging your PR, Conbench analyzed the 3 benchmarking runs that have been run so far on merge-commit 8e7a1f9.

There were no benchmark performance regressions. 🎉

The full Conbench report has more details.

@conbench-apache-arrow

Copy link
Copy Markdown

After merging your PR, Conbench analyzed the 3 benchmarking runs that have been run so far on merge-commit 8e7a1f9.

There were no benchmark performance regressions. 🎉

The full Conbench report has more details.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants