MagicStack / MagicStack/uvloop

Add riscv64 (linux_riscv64) wheel to PyPI releases

オープン
#732 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
Cython
スター
11.9k
フォーク
616
PR マージ指標
30日以内にマージされた PR はありません

説明

## Add `linux_riscv64` wheel to PyPI releases

### Summary

`pip install uvloop` on riscv64 Linux currently requires building from source (~5 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** | [`uvloop-0.22.1-cp313-cp313-linux_riscv64.whl`](https://github.com/gounthar/riscv64-python-wheels/releases/download/v2026.03.11-cp313/uvloop-0.22.1-cp313-cp313-linux_riscv64.whl) |
| **Hardware** | BananaPi F3 (SpacemiT K1, rv64imafdcv, 8 cores @ 1.6 GHz, 16 GB RAM) |
| **Python** | 3.13 (CPython) |
| **Build system** | cibuildwheel |
| **Build time** | ~5 min (native, on hardware) |

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

### Suggested CI change

**Workflow**: `.github/workflows/release.yml`

Add riscv64 to the matrix:

```yaml
# In strategy.matrix.cibw_arch, add riscv64:
cibw_arch: [x86_64, aarch64, universal2, riscv64]

# Add exclude for riscv64 on non-linux:
exclude:
- os: macos-latest
cibw_arch: riscv64
```

Add QEMU step and test skip:
```yaml
- name: Set up QEMU
if: matrix.cibw_arch == 'riscv64'
uses: docker/setup-qemu-action@v3
with:
platforms: riscv64

# Add to env:
CIBW_TEST_SKIP: '*-linux_riscv64'
```

libuv has riscv64 support since v1.44. Event-loop tests may hang under QEMU, hence the test skip recommendation.

### 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
- 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](https://gounthar.github.io/riscv64-python-wheels/simple/) 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

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

.github/workflows/release.yml から始めて、cibw_arch マトリックス、プラットフォームの除外設定、既存の wheel テストを確認します。Issue に記載されている riscv64 固有の QEMU セットアップと CIBW_TEST_SKIP エントリを追加し、エミュレーション下でイベントループのテストを実行せずに、release workflow が linux_riscv64 wheel を生成することを確認します。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
github-actions, python
領域
build-system, ci-cd, release
issue の種類
機能追加
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
明確に書かれている
初心者へのやさしさ
55/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。