Skip to content

cyvcf2: add build-cyvcf2.yml for riscv64 wheels - #1774

Open
luhenry wants to merge 3 commits into
mainfrom
cyvcf2
Open

cyvcf2: add build-cyvcf2.yml for riscv64 wheels#1774
luhenry wants to merge 3 commits into
mainfrom
cyvcf2

Conversation

@luhenry

@luhenry luhenry commented Sep 11, 2026

Copy link
Copy Markdown
Member

Cython wrapper around a vendored, statically-linked htslib for fast VCF/BCF parsing. Upstream publishes no riscv64 wheel.

Mirrors upstream's build_wheels job of wheels.yml.

Differs from upstream

  • Drops --enable-libcurl/--enable-s3/--with-libdeflate from CYVCF2_HTSLIB_CONFIGURE_OPTIONS - no libcurl-devel or EPEL on the riscv64 manylinux image, same gap as build-pysam.yml.
  • CIBW_BEFORE_ALL_LINUX installs autoconf/automake/libtool/cmake/ninja-build/zlib-bzip2-xz-devel via dnf - none of upstream's ci/linux-deps distro branches match Rocky 10.

Testing

  • same as upstream, via CIBW_TEST_SOURCES/CIBW_TEST_COMMAND instead of upstream's ci/test (which exercises remote HTTPS reading, unsupported once libcurl is dropped).

License: Wheel statically links htslib and its bundled htscodecs (both permissive MIT/BSD), which upstream's own packaging does not ship a licence for; the build adds LICENSE.htslib/LICENSE.htscodecs.

Patches

  • 0001-Add-htslib-htscodecs-LICENSE-files-at-project-root.patch - To upstream. Without it the wheel ships only cyvcf2's own LICENSE despite statically bundling htslib/htscodecs source. Reproduces on any arch.

Built on cp312; TBD passed, TBD skipped.

Cython wrapper around htslib (VCF/BCF parsing). htslib (with its
htscodecs submodule) is vendored as a git submodule and compiled from
source with autoreconf+configure+make, same shape as build-pysam.yml.

Drops --enable-libcurl/--enable-s3/--with-libdeflate from upstream's
CYVCF2_HTSLIB_CONFIGURE_OPTIONS: no libcurl-devel and no EPEL on the
riscv64 manylinux image (as build-pysam.yml/build-pybigwig.yml), and
each of those options defaults to a silent "check" in htslib's
configure.ac, so dropping them just lets the auto-detect fail closed
instead of requesting a feature we cannot build.
test_reader.py/test_writer.py use a package-relative `from ..cyvcf2 import
...` to reach the compiled extension, which needs cyvcf2/ itself to be a
proper package (an __init__.py) for pytest to resolve two levels up from
cyvcf2.tests. CIBW_TEST_SOURCES only staged cyvcf2/tests (no
cyvcf2/__init__.py), so pytest treated the staged tests/ as its own
top-level package and the relative import went past it: 'ImportError:
attempted relative import beyond top-level package'.

Merge the already-installed wheel into the staged cyvcf2/ directory before
running pytest (same cp -a pattern as build-dulwich.yml), so the relative
import resolves against the compiled wheel directly.
The auditwheel-repaired extension's RPATH is $ORIGIN-relative to a sibling
cyvcf2.libs/ (bundled libbz2/liblzma), which the previous fix didn't copy.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant