Skip to content

libusb-package: add build-libusb-package.yml for riscv64 wheels - #1870

Open
luhenry wants to merge 2 commits into
mainfrom
libusb-package
Open

libusb-package: add build-libusb-package.yml for riscv64 wheels#1870
luhenry wants to merge 2 commits into
mainfrom
libusb-package

Conversation

@luhenry

@luhenry luhenry commented Sep 12, 2026

Copy link
Copy Markdown
Member

Builds libusb 1.0 from the vendored src/libusb submodule and bundles the resulting shared library in the wheel, same as upstream does for every other platform. Upstream publishes no riscv64 wheel.

Mirrors upstream's build-wheels.yml.

Differs from upstream

  • One cp312 build per libc, not a matrix - the wheel is tagged py3-none-<plat> regardless of interpreter.

Matrix: cp312 only (manylinux + musllinux) - one interpreter is enough since the wheel is tagged py3-none.

Testing

  • added a smoke test asserting the bundled .so loads and the licence files ship - upstream's CI builds wheels but does not test them.

License: Wheel bundles libusb (LGPL-2.1); upstream ships no licence text for it, so the build adds it.

Patches

  • 0001-ship-libusb-s-lgpl-licence-alongside-the-package-s-.patch - To upstream [not yet submitted]. Without it the wheel ships no LGPL licence text. Reproduces on every platform, not riscv64-only.

Built on cp312 (manylinux + musllinux); smoke test passed on both.

Ships riscv64 wheels for libusb-package by building the vendored libusb-1.0
shared library from the src/libusb submodule via upstream's own setup.py
build_ext (autoreconf + configure + make), the same recipe upstream's own
cibuildwheel-based CI uses for every other platform.

Also ships libusb's own LGPL-2.1 COPYING alongside the package's Apache-2.0
LICENSE: every libusb-package wheel on PyPI is missing it, since
setup.cfg's license_file names only the wrapper's own notice.
The folded YAML scalar joined the opening quote and the next line with a
space, so python -c received a leading space before its first statement
and failed with IndentationError (both cp312 legs). Also, the publish
artifact-pattern used '-*-riscv64', which never matches the manylinux/
musllinux legs' '_riscv64' suffix; use tsv2py's '-*riscv64' convention
for a mixed-libc matrix instead.
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