MagicStack / MagicStack/uvloop

Add riscv64 (linux_riscv64) wheel to PyPI releases

Đang mở
#732 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Ngôn ngữ chính
Cython
Star
11.9k
Fork
616
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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
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:

# 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:

- 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 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

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Bắt đầu với .github/workflows/release.yml và kiểm tra ma trận cibw_arch, các loại trừ nền tảng và các bài kiểm tra wheel hiện có. Thêm thiết lập QEMU dành riêng cho riscv64 và mục CIBW_TEST_SKIP được mô tả trong issue, sau đó xác minh rằng release workflow tạo ra một wheel linux_riscv64 mà không chạy các bài kiểm tra event-loop trong môi trường giả lập.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
github-actions, python
Lĩnh vực
build-system, ci-cd, release
Loại issue
Tính năng
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Đặc tả rõ ràng
Mức phù hợp với người mới
55/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.