Conversation
Build biopython 1.88 riscv64 wheels with cibuildwheel, mirroring the `build_wheels` job of upstream's ci.yml (a plain setuptools build of 13 C extension modules, no build-time dependencies beyond setuptools) and its `test_macos`/`test_windows` jobs, which install only numpy and run `cd Tests && python run_tests.py --offline`. Upstream tags releases as `biopython-188` for version 1.88, so the tag is derived from the version input rather than taken directly. run_tests.py enumerates the doctest modules by walking `Tests/..` and several tests reach for `../Bio/Align/substitution_matrices/data` and `../Doc`, so `test-sources` stages `Tests Bio BioSQL Doc` to reproduce upstream's checkout layout around Tests/. Verified against the released PyPI wheel: staging `Tests` alone collects 209 tests and fails one, and without `Doc` test_Tutorial skips; the full staging collects 501 and passes. Every command runs from Tests/, which is what lands on sys.path[0], so the staged source tree never shadows the wheel. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
Adds
.github/workflows/build-biopython.yml, building riscv64 wheels for biopython 1.88.Shape
Build-from-checkout with cibuildwheel, per-interpreter matrix
cp312/cp313/cp314/cp314t. biopython publishes real per-interpretercpXY-cpXYmanylinux wheels (no abi3 tag anywhere in its PyPI file list), and its 13 C extension modules are declared as[[tool.setuptools.ext-modules]]inpyproject.tomlwith no build-time dependency beyondsetuptools>=74.1— so the build is a plainpip wheelwith nobefore-build, no Cython, and no native deps.numpyis a runtime dependency only.Upstream's own
ci.ymlhas no cibuildwheel config (itsbuild_wheelsjob is justpython -m build --wheelper interpreter on each OS), so the workflow follows this repo's standard cibuildwheel shape and mirrors upstream's steps rather than copying a wheels.yml that does not exist.Version vs tag
Upstream tags releases as
biopython-188for version1.88, so theversion:input stays the plain PyPI version — which is whatcheck_versions.pycompares against — and the checkout ref is derived from it in a one-line step.Testing
Mirrors upstream's
test_macos/test_windowsjobs: install onlynumpy(plussetuptools, whichrun_tests.pyimports forfind_packages) and runcd Tests && python run_tests.py --offline.PIP_EXTRA_INDEX_URLpoints at our registry so numpy resolves to the riscv64 wheel we ship (2.5.2, matching PyPI's latest).CIBW_TEST_SOURCES: Tests Bio BioSQL Docis load-bearing and was settled by dry-running the test phase against upstream's released PyPI wheel on this host before touching CI.run_tests.pyenumerates its doctest modules by walkingTests/..withsetuptools.find_packages, and several tests open data through../Bio/Align/substitution_matrices/data/BLOSUM62,../Doc/examples/nmr/noed.xpkand../Doc/Tutorial/index.rst. Measured: stagingTestsalone collects 209 tests and failstest_align_substitution_matrices; addingBio BioSQLcollects 501 and fails theBio.NMR.xpktoolsdoctest; addingDocpasses all 501, withtest_Tutorialrunning instead of skipping.The staged source tree cannot shadow the wheel because every command runs from
Tests/, which is what lands onsys.path[0]— verified by printingBio.__file__from there (it resolves into site-packages). This is exactly upstream's own layout, whereBio/sits atTests/..as unbuilt source while the tests import the installed build.Two independent proofs the wheel really is compiled: the test command imports all 13 extension modules by name before running the suite, and a post-build step asserts the wheel contains exactly 13
.sofiles.Licensing
The wheel ships
LICENSE.rstindist-info/licenses/(declared vialicense-filesinpyproject.toml), which carries both the Biopython License Agreement and the BSD 3-Clause text that the individual C file headers refer to. No external C library is vendored — every.csource is Biopython's own tree.Local validation
YAML parses;
actionlintclean apart from the expectedlabel "ubuntu-24.04-riscv" is unknown.python -m build --wheelfrom thebiopython-188checkout produces a wheel with all 13 extensions on this host.