Skip to content

Support armv6l and armv7l in pypi compatibility#2926

Merged
konstin merged 2 commits intomainfrom
konsti/fix-pypi-compatibility-arm67l
Jan 8, 2026
Merged

Support armv6l and armv7l in pypi compatibility#2926
konstin merged 2 commits intomainfrom
konsti/fix-pypi-compatibility-arm67l

Conversation

@konstin
Copy link
Member

@konstin konstin commented Jan 8, 2026

While pypi generally requires manylinux or musllinux tags, it also accepts linux_armv6l and linux_armv7l wheels (for historic reasons?):
https://github.com/pypi/warehouse/blob/556e1e3390999381c382873b003a779a1363cb4d/warehouse/forklift/legacy.py#L122-L123

This PR fixes the support for --compatibility pypi with these targets.

Test plan: The script below passes without warnings

# armv6l
rustup target add arm-unknown-linux-gnueabihf
rustup target add arm-unknown-linux-musleabihf
# armv7l
rustup target add armv7-unknown-linux-gnueabihf
rustup target add armv7-unknown-linux-musleabihf

# pyo3
cargo run -q -- build --manifest-path test-crates/pyo3-pure/Cargo.toml --zig -i python3 --compatibility pypi --target arm-unknown-linux-gnueabihf
cargo run -q -- build --manifest-path test-crates/pyo3-pure/Cargo.toml --zig -i python3 --compatibility pypi --target arm-unknown-linux-musleabihf
cargo run -q -- build --manifest-path test-crates/pyo3-pure/Cargo.toml --zig -i python3 --compatibility pypi --target armv7-unknown-linux-gnueabihf
cargo run -q -- build --manifest-path test-crates/pyo3-pure/Cargo.toml --zig -i python3 --compatibility pypi --target armv7-unknown-linux-musleabihf

# binary
cargo run -q -- build --manifest-path test-crates/hello-world/Cargo.toml --zig -i python3 --compatibility pypi --target arm-unknown-linux-gnueabihf
cargo run -q -- build --manifest-path test-crates/hello-world/Cargo.toml --zig -i python3 --compatibility pypi --target arm-unknown-linux-musleabihf
cargo run -q -- build --manifest-path test-crates/hello-world/Cargo.toml --zig -i python3 --compatibility pypi --target armv7-unknown-linux-gnueabihf
cargo run -q -- build --manifest-path test-crates/hello-world/Cargo.toml --zig -i python3 --compatibility pypi --target armv7-unknown-linux-musleabihf

While pypi generally requires manylinux or musllinux tags, it also accepts `linux_armv6l` and `linux_armv7l` wheels (for historic reasons?):
https://github.com/pypi/warehouse/blob/556e1e3390999381c382873b003a779a1363cb4d/warehouse/forklift/legacy.py#L122-L123

Test plan: The script below passes without warnings

```
# armv6l
rustup target add arm-unknown-linux-gnueabihf
rustup target add arm-unknown-linux-musleabihf
# armv7l
rustup target add armv7-unknown-linux-gnueabihf
rustup target add armv7-unknown-linux-musleabihf

# pyo3
cargo run -q -- build --manifest-path test-crates/pyo3-pure/Cargo.toml --zig -i python3 --compatibility pypi --target arm-unknown-linux-gnueabihf
cargo run -q -- build --manifest-path test-crates/pyo3-pure/Cargo.toml --zig -i python3 --compatibility pypi --target arm-unknown-linux-musleabihf
cargo run -q -- build --manifest-path test-crates/pyo3-pure/Cargo.toml --zig -i python3 --compatibility pypi --target armv7-unknown-linux-gnueabihf
cargo run -q -- build --manifest-path test-crates/pyo3-pure/Cargo.toml --zig -i python3 --compatibility pypi --target armv7-unknown-linux-musleabihf

# binary
cargo run -q -- build --manifest-path test-crates/hello-world/Cargo.toml --zig -i python3 --compatibility pypi --target arm-unknown-linux-gnueabihf
cargo run -q -- build --manifest-path test-crates/hello-world/Cargo.toml --zig -i python3 --compatibility pypi --target arm-unknown-linux-musleabihf
cargo run -q -- build --manifest-path test-crates/hello-world/Cargo.toml --zig -i python3 --compatibility pypi --target armv7-unknown-linux-gnueabihf
cargo run -q -- build --manifest-path test-crates/hello-world/Cargo.toml --zig -i python3 --compatibility pypi --target armv7-unknown-linux-musleabihf
```
@konstin konstin added the bug Something isn't working label Jan 8, 2026
@konstin konstin merged commit e5fa277 into main Jan 8, 2026
45 checks passed
@konstin konstin deleted the konsti/fix-pypi-compatibility-arm67l branch January 8, 2026 13:56
konstin added a commit to konstin/maturin that referenced this pull request Jan 8, 2026
While pypi generally requires manylinux or musllinux tags, it also
accepts `linux_armv6l` and `linux_armv7l` wheels (for historic
reasons?):

https://github.com/pypi/warehouse/blob/556e1e3390999381c382873b003a779a1363cb4d/warehouse/forklift/legacy.py#L122-L123

This PR fixes the support for `--compatibility pypi` with these targets.

Test plan: The script below passes without warnings

```
# armv6l
rustup target add arm-unknown-linux-gnueabihf
rustup target add arm-unknown-linux-musleabihf
# armv7l
rustup target add armv7-unknown-linux-gnueabihf
rustup target add armv7-unknown-linux-musleabihf

# pyo3
cargo run -q -- build --manifest-path test-crates/pyo3-pure/Cargo.toml --zig -i python3 --compatibility pypi --target arm-unknown-linux-gnueabihf
cargo run -q -- build --manifest-path test-crates/pyo3-pure/Cargo.toml --zig -i python3 --compatibility pypi --target arm-unknown-linux-musleabihf
cargo run -q -- build --manifest-path test-crates/pyo3-pure/Cargo.toml --zig -i python3 --compatibility pypi --target armv7-unknown-linux-gnueabihf
cargo run -q -- build --manifest-path test-crates/pyo3-pure/Cargo.toml --zig -i python3 --compatibility pypi --target armv7-unknown-linux-musleabihf

# binary
cargo run -q -- build --manifest-path test-crates/hello-world/Cargo.toml --zig -i python3 --compatibility pypi --target arm-unknown-linux-gnueabihf
cargo run -q -- build --manifest-path test-crates/hello-world/Cargo.toml --zig -i python3 --compatibility pypi --target arm-unknown-linux-musleabihf
cargo run -q -- build --manifest-path test-crates/hello-world/Cargo.toml --zig -i python3 --compatibility pypi --target armv7-unknown-linux-gnueabihf
cargo run -q -- build --manifest-path test-crates/hello-world/Cargo.toml --zig -i python3 --compatibility pypi --target armv7-unknown-linux-musleabihf
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant