Skip to content

fix(ci): remove PYO3_CROSS_PYTHON_VERSION, use pypa manylinux image for aarch64#60

Merged
polaz merged 2 commits intomainfrom
fix/#60-aarch64-qemu-image
May 3, 2026
Merged

fix(ci): remove PYO3_CROSS_PYTHON_VERSION, use pypa manylinux image for aarch64#60
polaz merged 2 commits intomainfrom
fix/#60-aarch64-qemu-image

Conversation

@polaz
Copy link
Copy Markdown
Member

@polaz polaz commented May 3, 2026

Problem

PR #58 introduced `PYO3_CROSS_PYTHON_VERSION: ${{ matrix.pyo3_cross_python_version }}` on the maturin build step. For all matrix entries except aarch64 Linux, this variable is unset, so GitHub Actions passes it as an empty string `""`.

PyO3's build script fails to parse the empty string as a version:
```
error: failed to parse PYO3_CROSS_PYTHON_VERSION
caused by:

  • 0: expected major.minor version
    ```

This breaks all build-embedded jobs (x86_64 Linux, macOS, Windows, aarch64).

Fix

  1. Remove the PYO3_CROSS_PYTHON_VERSION env var entirely from the build step.
  2. For aarch64 Linux: use quay.io/pypa/manylinux_2_28_aarch64 (official pypa image with Python 3.11–3.13) via QEMU emulation instead of the rust-cross container that has no Python. QEMU is already set up in the workflow.

…uild

PYO3_CROSS_PYTHON_VERSION did not help because maturin discovers Python
interpreters before PyO3 reads env vars. The rust-cross container has no
Python at all, so interpreter discovery always fails.

Fix: use quay.io/pypa/manylinux_2_28_aarch64 (official pypa image with
Python 3.11–3.13) via QEMU emulation. Slower than cross-compilation but
reliably produces correct wheels without manual interpreter wiring.
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 3, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: c4904f80-1446-41a0-985b-9ed4011d8865

📥 Commits

Reviewing files that changed from the base of the PR and between e288ddd and 5e6ff67.

📒 Files selected for processing (1)
  • .github/workflows/release.yml

📝 Walkthrough

Summary by CodeRabbit

  • Chores
    • Switched the Linux aarch64 build to run inside official manylinux container images with QEMU emulation for more consistent release builds.
    • Removed previous environment wiring tied to the cross-compilation override.
    • Added support to run the packaging step inside the specified manylinux container when provided.

Walkthrough

The release GitHub Actions workflow switches the Linux aarch64 build in the build-embedded matrix to run inside the official quay.io/pypa/manylinux_2_28_aarch64 container (QEMU), removes the PYO3_CROSS_PYTHON_VERSION env wiring, and makes the maturin step optionally run in the specified container.

Changes

aarch64 Embedded Wheel Build

Layer / File(s) Summary
Matrix Entry
.github/workflows/release.yml
The build-embedded matrix include entry for Linux aarch64 now sets container: quay.io/pypa/manylinux_2_28_aarch64 and removes the previous pyo3_cross_python_version field; comments updated to note Python is preinstalled in the image.
Build Step Wiring
.github/workflows/release.yml
In the maturin "Build wheels" step, removed env: PYO3_CROSS_PYTHON_VERSION: ${{ matrix.pyo3_cross_python_version }} and added `container: ${{ matrix.container

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title directly and specifically describes the main changes: removing PYO3_CROSS_PYTHON_VERSION and switching aarch64 to use the pypa manylinux image.
Description check ✅ Passed The description clearly explains the problem (PR #58 introduced PYO3_CROSS_PYTHON_VERSION which fails to parse as empty string), the impact (breaks all build-embedded jobs), and the solution (remove the variable and use official pypa manylinux image for aarch64).
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/#60-aarch64-qemu-image

Review rate limit: 2/5 reviews remaining, refill in 28 minutes and 51 seconds.

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/workflows/release.yml:
- Around line 76-81: The matrix entry currently uses the key manylinux to
specify the aarch64 image but the action expects a manylinux policy (e.g.,
"2_28") and a separate container override; update the matrix row so manylinux is
set to "2_28" (or keep the policy) and add a new container field with
"quay.io/pypa/manylinux_2_28_aarch64", then ensure the build step that invokes
pyo3/maturin-action (or maturin-action) passes both manylinux and container
through to the action inputs so the workflow uses the correct pypa image under
QEMU for aarch64.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: ae6a4259-8a20-4674-ab3a-edc70f22e2c3

📥 Commits

Reviewing files that changed from the base of the PR and between bd96f51 and e288ddd.

📒 Files selected for processing (1)
  • .github/workflows/release.yml

Comment thread .github/workflows/release.yml Outdated
…s policy

maturin-action uses manylinux as the platform policy tag (e.g. manylinux_2_28)
and container as the Docker image override. Passing the full image URL in
manylinux was incorrect and would not select the pypa image.
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 3, 2026

@polaz polaz merged commit 13cbc7d into main May 3, 2026
8 checks passed
@polaz polaz deleted the fix/#60-aarch64-qemu-image branch May 3, 2026 07:20
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