Skip to content

ci(python): pin MACOSX_DEPLOYMENT_TARGET so the cross-built x86 wheel is installable#14

Open
alvinttang wants to merge 1 commit into
mainfrom
ci/python-wheel-pin-macos-deployment-target
Open

ci(python): pin MACOSX_DEPLOYMENT_TARGET so the cross-built x86 wheel is installable#14
alvinttang wants to merge 1 commit into
mainfrom
ci/python-wheel-pin-macos-deployment-target

Conversation

@alvinttang

Copy link
Copy Markdown
Collaborator

Why (follow-up to #13)

#13 restored the x86_64-apple-darwin wheel by cross-building it on the Apple-silicon macos-latest runner. That works, but a Python wheel carries a platform tag derived from the macOS deployment target — and it was unpinned.

On a macOS 14/15 runner the cross-built x86 wheel can be tagged macosx_14_*_x86_64. pip on an older Intel Mac then rejects that wheel and silently falls back to the sdist (compile-from-source) — defeating the entire point of shipping the wheel. A raw binary tarball (release-binary.yml) doesn't have this failure mode; a tagged wheel does.

Change

Pin an explicit floor per arch, via env on the maturin step:

target MACOSX_DEPLOYMENT_TARGET
x86_64-apple-darwin 10.12 (broad Intel-Mac compatibility)
aarch64-apple-darwin 11.0 (Apple-silicon minimum; explicit, not host-SDK-derived)
Linux leg matrix field absent → env expands to empty → ignored off-macOS

Verification

release-python.yml workflow_dispatch runs build + sdist but not publish (gated on refs/tags/) — a zero-risk dry-run. Triggered on main to confirm the cross-build itself works; this PR adds the tag pin on top. Inspect the produced wheels-x86_64-apple-darwin artifact's filename to confirm the macosx_10_12_x86_64 tag before the next release tag.

🤖 Generated with Claude Code

… is installable

PR #13 restored the x86_64-apple-darwin wheel by cross-building it on the
Apple-silicon macos-latest runner. But the wheel's platform tag is derived from
the macOS deployment target, which was unpinned — so a cross-build on a macOS
14/15 runner risks tagging the wheel macosx_14_*_x86_64. pip on an older Intel
Mac would then reject that wheel and silently fall back to the sdist (compile
from source), defeating the whole point of shipping the wheel.

Pin an explicit floor per arch via env on the maturin step:
- x86_64-apple-darwin -> 10.12 (broad Intel-Mac compatibility)
- aarch64-apple-darwin -> 11.0 (Apple-silicon minimum; explicit, not host-derived)
- Linux leg: matrix field absent -> env expands empty -> ignored off-macOS

Follow-up to #13. Verify with the release-python workflow_dispatch dry-run
before the next version tag.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.

2 participants