fix(ci): set PYO3_CROSS_PYTHON_VERSION for aarch64 Linux cross-compilation#58
fix(ci): set PYO3_CROSS_PYTHON_VERSION for aarch64 Linux cross-compilation#58
Conversation
rust-cross/manylinux_2_28-cross:aarch64 has no Python interpreter, so maturin fails with "Couldn't find any python interpreters". Setting PYO3_CROSS_PYTHON_VERSION=3.11 lets PyO3 generate bindings without requiring a Python binary in the cross-compilation container.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughSummary by CodeRabbit
WalkthroughThe PR updates the ChangesCI Cross-Compilation Configuration
Estimated code review effort🎯 2 (Simple) | ⏱️ ~5 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Review rate limit: 4/5 reviews remaining, refill in 12 minutes. Comment |
|



Problem
Build embedded / aarch64 (ubuntu-latest)fails with:maturin-actionv1.47.0 withmanylinux_2_28+target: aarch64on an x86_64 runner usesghcr.io/rust-cross/manylinux_2_28-cross:aarch64— a Debian-based cross-compilation container with no Python interpreters.Fix
Set
PYO3_CROSS_PYTHON_VERSION=3.11for the aarch64 Linux matrix entry. This tells PyO3 to generate bindings for Python 3.11 without needing a Python binary in the container — the standard approach for cross-compilation without QEMU emulation.The env var is only set for the aarch64 Linux matrix entry; other entries have it empty/unset. PyO3 ignores it on native builds where Python is available.