Skip to content

Add riscv64 (linux_riscv64) wheel to PyPI releases #14460

@gounthar

Description

@gounthar

Add linux_riscv64 wheel to PyPI releases

Summary

pip install cryptography on riscv64 Linux currently requires building from source (~8 min on a 1.6 GHz RISC-V SoC). Adding linux_riscv64 to the wheel build matrix would give riscv64 users a prebuilt wheel.

Evidence

Tested wheel cryptography-46.0.5-cp313-abi3-linux_riscv64.whl
Hardware BananaPi F3 (SpacemiT K1, rv64imafdcv, 8 cores @ 1.6 GHz, 16 GB RAM)
Python 3.13 (CPython)
Build system custom (ghcr.io/pyca containers + Rust)
Build time ~8 min (native, on hardware)

The wheel imports and passes basic smoke tests on riscv64 Linux.

Suggested CI change

Workflow: .github/workflows/wheel-builder.yml

This is a multi-step change requiring infrastructure work:

  1. Build a cryptography-manylinux_2_28:riscv64 container in pyca/infra
  2. Cross-build static OpenSSL for riscv64 in pyca/infra
  3. Add a MANYLINUX entry to wheel-builder.yml:
- NAME: manylinux_2_28_riscv64
  CONTAINER: cryptography-manylinux_2_28:riscv64
  RUNNER: ubuntu-latest
  1. Add QEMU setup for the riscv64 runner

Note: This cannot be a simple one-line change. The infrastructure in pyca/infra must be updated first.

Ecosystem context

  • manylinux_2_28_riscv64 images are available on quay.io/pypa/ (landed in pypa/manylinux, 2025)
  • cibuildwheel 3.x supports riscv64 via QEMU emulation
  • auditwheel supports riscv64 platform tags
  • maturin-action supports riscv64gc-unknown-linux-gnu cross-compilation
  • Packages already shipping riscv64 wheels on PyPI: aiohttp, yarl, regex, markupsafe, charset-normalizer, rpds-py, multidict, propcache, watchfiles, rignore, setproctitle
  • RISC-V hardware is shipping: SiFive HiFive, SpacemiT K1/K3, Sophgo SG2044 (64-core)

Our temporary index

While upstream support is pending, we maintain a PEP 503 index with 50+ riscv64 wheels for the Python ML/AI stack, built natively on RISC-V hardware.

Tracking repo: https://github.com/gounthar/riscv64-python-wheels

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions