Skip to content

Commit 269805e

Browse files
committed
fix(ci): set PYO3_CROSS_PYTHON_VERSION for aarch64 cross-compilation
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.
1 parent 73bf4db commit 269805e

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

.github/workflows/release.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,13 @@ jobs:
7373
manylinux: manylinux_2_28
7474

7575
# Linux aarch64 — AWS Graviton, Raspberry Pi, etc.
76-
# Requires QEMU (set up below) for cross-compilation on the x86_64 runner.
76+
# Cross-compiled on the x86_64 runner using rust-cross container.
77+
# rust-cross/manylinux_2_28-cross has no Python, so PYO3_CROSS_PYTHON_VERSION
78+
# tells PyO3 which version to target without needing a Python binary.
7779
- os: ubuntu-latest
7880
target: aarch64
7981
manylinux: manylinux_2_28
82+
pyo3_cross_python_version: "3.11"
8083

8184
# macOS Apple Silicon (M1/M2/M3)
8285
# Pin to Python 3.13: macos-latest ships Python 3.14 which PyO3 0.23.x
@@ -132,6 +135,8 @@ jobs:
132135

133136
- name: Build wheels
134137
uses: PyO3/maturin-action@32307a466a178317e8c2ae343b38e73896a047be # v1.47.0
138+
env:
139+
PYO3_CROSS_PYTHON_VERSION: ${{ matrix.pyo3_cross_python_version }}
135140
with:
136141
command: build
137142
args: >-

0 commit comments

Comments
 (0)