Conversation
|
@threexc what should we do here for the licensing? I'm not sure I understand the situation exactly |
|
We will need to release the sources of the GPL binaries as well. I see that https://github.com/PyAV-Org/PyAV#installing-from-source outlines how to build from source. Maybe we should be using that on our CI? From looking at https://github.com/PyAV-Org/PyAV/blob/main/.github/workflows/tests.yml, we must be doing the same of gathering the sources and shipping them: https://github.com/PyAV-Org/PyAV/blob/main/.github/workflows/tests.yml#L7-L23 |
|
Here is what is actually in the wheel, and what the latest push does about it. The situation. Before this push the wheel shipped only PyAV's own BSD-3-Clause What the push does. A On building FFmpeg ourselves. Three things left for you to decide.
|
|
FYI: PyAV-Org/PyAV#2407 |
PyAV compiles ~49 Cython extension modules against FFmpeg. Upstream's tests.yml fetches a prebuilt FFmpeg tarball from PyAV-Org/pyav-ffmpeg in CIBW_BEFORE_BUILD; that project already publishes ffmpeg-manylinux-riscv64.tar.gz, so the recipe carries over unchanged and auditwheel bundles the FFmpeg libraries into the wheel. setup.py turns on Py_LIMITED_API (cp311) for CPython 3.11-3.13, so the build on our cp312 floor emits the same cp311-abi3 wheel upstream ships; free-threaded builds get their own cp314-cp314t wheel. Upstream builds on cp311, which is below this repo's floor. Validated on aarch64 in quay.io/pypa/manylinux_2_39_aarch64: the wheel builds, auditwheel repairs it to 34MB with 32 bundled libraries, and upstream's test command passes 490 tests against the installed wheel.
setup.py tags the wheel cp311-abi3, so the stable-ABI guarantee only holds if it is compiled against 3.11 headers; building it on cp312 would ship a wheel pip installs on 3.11 that may fail at runtime there. Upstream builds on cp311 for the same reason. numpy resolves to 2.4.3 on 3.11, which our registry ships for riscv64.
Upstream builds both wheels in one cibuildwheel invocation with CIBW_BUILD: "cp311* cp314t*" and sets CIBW_ENVIRONMENT_LINUX; this was a two-entry matrix with per-entry only:, and CIBW_ENVIRONMENT. Nothing about riscv64 required either change, so drop them.
Collapsing the matrix to one job renamed the artifact to av-<version>-manylinux_riscv64, but artifact-pattern still expected a segment between the version and the platform, so it matched nothing.
The wheels bundle 33 prebuilt shared libraries fetched from a pyav-ffmpeg release, and shipped only PyAV's own BSD-3-Clause LICENSE.txt. Two of those libraries are GPL. pyav-ffmpeg patches FFmpeg's configure to move libx264 and libx265 out of EXTERNAL_LIBRARY_GPL_LIST into EXTERNAL_LIBRARY_VERSION3_LIST, so FFmpeg builds without --enable-gpl and reports "LGPL version 3 or later" while libavcodec still has DT_NEEDED on libx264.so.165 and libx265.so.216, both GPL-2.0-or-later. The rest of the stack is LGPL (FFmpeg, GnuTLS, Nettle, GMP, libunistring, alsa-lib, LAME) or permissive. A new vendor_sources job reads the URL and SHA-256 pins out of pyav-ffmpeg's scripts/pkg.py, downloads every source tarball plus the pyav-ffmpeg tree that carries the build recipe and its FFmpeg/GMP/LAME/vpx patches, and extracts each project's licence texts. The sources are published as a GitHub Release asset; the licence texts are staged into the checkout so setuptools' default glob ships them in dist-info/licenses, and the post-build check asserts the whole set is present in every wheel.
This workflow predates the shared setup/publish workflows: it baked 18.1.0 into a workflow_dispatch default, had no push trigger, and published through actions/publish-wheels, which no longer exists. Declare the version in docs/packages/av.yaml instead, take the build matrix from _setup.yml, and publish with _publish-wheel.yml, which creates the GitHub Release and opens the documentation PR. The GPL sources artifact is passed to it unchanged. The build itself is untouched - same cibuildwheel invocation, same CIBW_BUILD selection, same wheel-content check.
|
av18.1.0PyAV compiles ~49 Cython extension modules against FFmpeg. Upstream publishes no riscv64 wheel.
Mirrors upstream's
tests.yml.Differs from upstream
PIP_EXTRA_INDEX_URLadded - numpy resolves from our registry.Matrix:
cp311-abi3andcp314-cp314t, as upstream builds - PyAV's extensions are limited-API.Testing
License: Wheel bundles libx264 and libx265 (GPL-2.0-or-later) plus FFmpeg, GnuTLS, Nettle, GMP, libunistring, alsa-lib and LAME (LGPL-2.1-or-later); upstream ships no licence text for any of them, so the build adds it and publishes their corresponding sources as a release asset.
Built on cp311 and cp314t, manylinux and musllinux; 490 passed, 38 skipped.
Closes #2136