Conversation
|
The error is coming from upstream's pyproject.toml, starting at line 31: There are sections following it for different architectures, e.g.: Easiest is to add a patch for our needs, and I can take this as a task to try getting upstream. EDIT: I went to see how we build it for qemuriscv64 in Yocto (which also builds riscv64gc packages right now). Here's what I think is the key set of flags:
|
|
@luhenry my bad, my suggestion to rework the triggers broke our UI experience a bit (not actually seeing the workflows running anymore). I'm going to get a revert in and improve the logic. Here is the workflow you triggered: https://github.com/riseproject-dev/python-wheels/actions/runs/32887623280 |
Cython ships per-interpreter compiled wheels (cp39-cp315) plus a py3-none-any fallback on PyPI, but none for riscv64 -- which every source build of a Cython-using package on riscv64 needs (protobuf, fonttools, grpcio-tools, etc. all compile Cython from sdist today). Cython is self-hosting: setup.py compiles its own modules with the in-tree Cython, so the build-from-checkout shape needs no external build tool. Matrix is per-interpreter [cp312, cp313, cp314] with no cp314t -- setup.py disables self-compilation under Py_GIL_DISABLED, so a free-threaded build would silently ship the pure-Python fallback. The wheel test asserts a core module loaded from a compiled .so (a self-compile failure degrades to the pure-Python fallback silently) and then cythonizes+compiles+imports a module to prove the wheel works as a compiler end-to-end. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The CI build failed because upstream's pyproject.toml [tool.cibuildwheel]
config sets x86 CFLAGS (-march=core2 -mno-ssse3) with per-arch overrides
for aarch64/armv7l but none for riscv64, so the riscv64 build inherited
the x86 flags and gcc rejected them ("ISA string must begin with rv").
Add patches/cython/3.3.0/ with a riscv64 [tool.cibuildwheel] override
(applied matplotlib/pillow-style via a second checkout + git apply),
using the RVA-baseline flags used for riscv64gc builds. Also add
patches/cython/** to the PR paths trigger.
Replace the placeholder smoke test with upstream's own suite
(Tools/ci-run.sh): runtests.py over the bundled tests/, C and C++
backends. runtests.py + tests/ are copied into cibuildwheel's temp test
cwd (not the source Cython/) so the suite exercises the installed wheel,
not the checkout's pure-Python source.
Validated end-to-end under QEMU: cp312 wheel builds with 19 compiled
.so, and a runtests.py shard passes 186 tests against it.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
What
Adds
.github/workflows/build-cython.ymlto build Cython 3.3.0 riscv64 wheels and publish them topypi.riseproject.dev.Why
Cython ships per-interpreter compiled wheels (cp39–cp315) plus a
py3-none-anyfallback on PyPI, but none for riscv64. Every source build of a Cython-using package on riscv64 (protobuf, fonttools, grpcio-tools, …) compiles Cython from sdist today — a compiled riscv64 wheel removes that repeated cost.Shape
setup.pycompiles its own modules with the in-tree Cython, so no external build tool /CIBW_BEFORE_BUILDis needed. Tag3.3.0== package version, so no sdist/version-derivation step.[cp312, cp313, cp314], per-interpreter (not abi3). Nocp314t:setup.pydisables self-compilation underPy_GIL_DISABLED(a compiled Cython would force the GIL back on), so a free-threaded build would silently ship the pure-Python fallback. Upstream ships zero free-threaded compiled wheels.Cython.Compiler.Scanning) loaded from a compiled.so— guarding against a silent degrade to the mislabeled pure-Python wheel — then cythonizes + compiles + imports a.pyxto prove the wheel works as a compiler end-to-end.CIBW_TEST_REQUIRES: setuptoolsbecause the manylinux base interpreter ships neither setuptools nor distutils (dropped in 3.12), whichcythonize -ineeds.Local validation (QEMU / manylinux_2_39_riscv64)
.sounder QEMU:Scanners.cpython-312-riscv64-linux-gnu.so … UCB RISC-V, RVC, double-float ABI.py3-none-anywheel (AssertionError: expected compiled .so … (pure-Python fallback)).🤖 Generated with Claude Code