Skip to content

Stop hardcode platform tag when using zig#2905

Merged
messense merged 1 commit intoPyO3:mainfrom
messense:zig-default-platform-tag
Dec 29, 2025
Merged

Stop hardcode platform tag when using zig#2905
messense merged 1 commit intoPyO3:mainfrom
messense:zig-default-platform-tag

Conversation

@messense
Copy link
Member

Try to fix #2901 (comment)

Copilot AI review requested due to automatic review settings December 29, 2025 12:54
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR removes hardcoded platform tag determination when using Zig for cross-compilation on Linux glibc targets. Instead of forcing a specific manylinux version based on Rust compiler capabilities, the build now defers to auditwheel to automatically detect the appropriate compatibility tag based on the actual binary's dependencies and symbols.

  • Changed zig+glibc builds to return None for platform tag instead of target.get_minimum_manylinux_tag()
  • Removed test assertions that validated the hardcoded platform tag behavior
  • Removed unused PlatformTag import from test file

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/build_options.rs Changed zig+glibc builds to return None for compatibility tag instead of hardcoded minimum manylinux tag, allowing auditwheel to dynamically determine the appropriate tag based on actual binary dependencies
tests/common/integration.rs Removed test logic that validated hardcoded platform tags for zig builds and removed now-unused PlatformTag import

@messense messense force-pushed the zig-default-platform-tag branch from 50e9615 to 3aeae01 Compare December 29, 2025 13:02
@messense messense force-pushed the zig-default-platform-tag branch from 3aeae01 to eb38efe Compare December 29, 2025 13:35
@messense messense merged commit d637e6e into PyO3:main Dec 29, 2025
43 of 45 checks passed
@messense messense deleted the zig-default-platform-tag branch December 29, 2025 13:58
tuxu added a commit to tuxu/maturin that referenced this pull request Jan 6, 2026
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.

1 participant