Skip to content

build(python): Add build for riscv64 wheels - #27149

Open
threexc wants to merge 2 commits into
pola-rs:mainfrom
threexc:tgamblin/riscv64
Open

threexc wants to merge 2 commits into
pola-rs:mainfrom
threexc:tgamblin/riscv64

Conversation

@threexc

@threexc threexc commented Apr 1, 2026 •

Copy link
Copy Markdown

As part of the RISE Project, we are helping to build riscv64 binary wheels for a variety Python modules. Add support for glibc-based builds by using official RISE RISC-V GitHub Actions Runners. Note that they have to be enabled for the project to use them - instructions for doing so are here.

I've triggered a dry-run on my fork - the riscv64 builds look OK, but Windows ones are failing.. I ran make check after make build locally. Here's the end of that output:

Image

@github-actions github-actions Bot added build Changes that affect the build system or external dependencies python Related to Python Polars first-contribution First contribution by user labels Apr 1, 2026
@threexc
threexc force-pushed the tgamblin/riscv64 branch 2 times, most recently from a08456f to f47f9a7 Compare April 1, 2026 18:28
@threexc

threexc commented Apr 1, 2026

Copy link
Copy Markdown
Author

I've added a setup step to account for riscv64 Python, but it seems there are no Pythons available at any version yet in the GitHub manifests - I'll have to look further into it...

@threexc
threexc force-pushed the tgamblin/riscv64 branch 2 times, most recently from 39af252 to 63b31c8 Compare April 1, 2026 18:41
@orlp

orlp commented Apr 2, 2026

Copy link
Copy Markdown
Member

This is blocked on upstream actions/setup-python#1288 right?

@threexc

threexc commented Apr 2, 2026

Copy link
Copy Markdown
Author

This is blocked on upstream actions/setup-python#1288 right?

Right. As soon as I have word there I'll update it again.

@orlp
orlp marked this pull request as draft April 2, 2026 13:30
@orlp

orlp commented Apr 2, 2026

Copy link
Copy Markdown
Member

I've converted this PR to a draft for the moment.

Comment thread .github/workflows/release-python.yml Resolved
@threexc
threexc force-pushed the tgamblin/riscv64 branch from 63b31c8 to 735cbe9 Compare April 7, 2026 13:42
Comment thread .github/workflows/release-python.yml Resolved
@threexc

threexc commented Nov 10, 2026

Copy link
Copy Markdown
Author

Coming back to this finally. I've rebased the branch and simplified the contributions a bit, including using the RISE version of setup-python as @luhenry suggested, since the upstream one won't be ready for a while yet. I've also dropped the musl build for now to reduce the change scope - I can add it back in if desired. The workflows have been updated since the original in ways that mean I can drop some of the extra variables I was previously setting, e.g. PYTHON_VERSION_LINUX_RISCV64. Other details about enabling the RISE Runners' app still apply.

Here's the output of make check after make build again (note that the branch says tgamblin/riscv64-test, which matches this one):

Image

@threexc
threexc marked this pull request as ready for review November 10, 2026 17:10
@luhenry

luhenry commented Nov 11, 2026

Copy link
Copy Markdown

I've rebased the branch and simplified the contributions a bit, including using the RISE version of setup-python as @luhenry suggested, since the upstream one won't be ready for a while yet.

You can use actions/[email protected] (https://github.com/actions/setup-python/releases/tag/v7.1.0), and use mirror: https://raw.githubusercontent.com/riseproject-dev/python-versions/refs/heads/main/versions-manifest.json. This way you still use actions/setup-python, but you have access to riscv64 python builds.

Comment thread .github/workflows/release-python.yml Resolved
@threexc

threexc commented Nov 11, 2026

Copy link
Copy Markdown
Author

I've rebased the branch and simplified the contributions a bit, including using the RISE version of setup-python as @luhenry suggested, since the upstream one won't be ready for a while yet.

You can use actions/[email protected] (https://github.com/actions/setup-python/releases/tag/v7.1.0), and use mirror: https://raw.githubusercontent.com/riseproject-dev/python-versions/refs/heads/main/versions-manifest.json. This way you still use actions/setup-python, but you have access to riscv64 python builds.

Thanks for the reminder, I had forgotten that we can use setup-python directly now (instead of setup-uv or the RISE fork). Bumped the version and reworded the commit.

@threexc

threexc commented Nov 11, 2026

Copy link
Copy Markdown
Author

The lint failure appears to be a timeout/network issue rather than a real problem with the commits...

setup-python v7.1.0 supports specifying the `mirror` option when using
custom Python distributions is needed, e.g. for the riscv64
architecture. Bump the version and set the mirror conditionally.

Signed-off-by: Trevor Gamblin <[email protected]>
@threexc

threexc commented Nov 11, 2026 •

Copy link
Copy Markdown
Author

I have a dry run triggered on my fork: here

The win-arm64 builds seem to be breaking, and the tests are hitting a networking/timeout issue. Everything else either passed or is still in progress (like the riscv64 builds).

EDIT: test step failed because pip was too old - 24.1 is the minimum version for riscv64. I've modified the Test wheel step to upgrade it in the commit adding linux-riscv64 builds. New run here

Build polars Python modules for riscv64 by using the
riscv64gc-unknown-linux-gnu target. Use a RISE labeled native runner for
the 'os'. Make sure to upgrade pip in the 'Test wheel' step, since
riscv64 isn't supported before version 24.1.

See: https://riseproject-dev.github.io/riscv-runner/

Signed-off-by: Trevor Gamblin <[email protected]>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build Changes that affect the build system or external dependencies first-contribution First contribution by user python Related to Python Polars

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants