scikit-learn: add build-scikit-learn.yml for riscv64 wheels - #339
Draft
luhenry wants to merge 2 commits into
Draft
scikit-learn: add build-scikit-learn.yml for riscv64 wheels#339luhenry wants to merge 2 commits into
luhenry wants to merge 2 commits into
Conversation
scikit-learn publishes manylinux wheels for every architecture except riscv64, so nothing installs on ubuntu-24.04-riscv today. The workflow mirrors the `build_wheels` job of upstream's .github/workflows/wheels.yml, narrowed to riscv64: the same cibw_before_build.sh / test_wheels.sh entry points, the same RUNNER_OS pass-through that check_license.py depends on, and the same SKLEARN_SKIP_NETWORK_TESTS=1. riscv64-only overrides: - CIBW_MANYLINUX_RISCV64_IMAGE, - PIP_EXTRA_INDEX_URL so numpy/scipy/pandas resolve to our riscv64 wheels in both the build and the test phase, - PIP_ONLY_BINARY scoped to those three so pip cannot silently source-build them; it is deliberately not :all:, since cython and meson-python have no riscv64 wheel anywhere and must compile from sdist in the build environment. pytest-xdist is added to CIBW_TEST_REQUIRES: upstream's test_wheels.sh already uses it when present, and the full sklearn suite is otherwise too slow on the riscv64 runner. The matrix stops at cp313 because scipy is a *build* requirement (sklearn cimports scipy.linalg.cython_blas) and pypi.riseproject.dev carries riscv64 scipy only up to cp313 (1.15.2); cp314/cp314t can be added once scipy is built for them. A gpl_sources job is included: auditwheel vendors the manylinux image's libgomp into the wheel (scikit_learn.libs/libgomp-*.so.1.0.0, as upstream's build_tools/wheels/LICENSE_linux.txt documents), so the gcc sources that produced it have to be published alongside. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Reverts the temporary cp312/cp313 restriction: scipy 1.18.1 riscv64 wheels are published for all four interpreters, including cp314t, so the build requirement resolves.
luhenry
marked this pull request as ready for review
August 26, 2026 18:50
Member
Author
|
Depends on |
luhenry
marked this pull request as draft
August 26, 2026 19:02
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
scikit-learn1.9.0~100 Cython/C++ extension modules. Upstream publishes manylinux wheels for every architecture except riscv64.
Mirrors upstream's
wheels.yml, reusing itscibw_before_build.shandtest_wheels.sh.Differs from upstream
PIP_EXTRA_INDEX_URLplusPIP_ONLY_BINARY=numpy,scipy,pandas— those three have no riscv64 wheels on PyPI and must come from our registry.cythonandmeson-pythonare deliberately not in the list; they have no riscv64 wheel anywhere and build from sdist.Testing
License: ✅
cibw_before_build.shappends the bundled-library notice toCOPYING, andtest_wheels.shasserts it viacheck_license.py.A
gpl_sourcesjob publishes gcc sources against the same pinned image, since auditwheel bundles the image's libgomp.