Package licenses of vendored lz4 and xxHash sources - #344
Open
pctablet505 wants to merge 1 commit into
Open
Conversation
The wheel only ever shipped the wrapper's own BSD-3-Clause LICENSE, even though it also bundles and compiles the vendored lz4/xxHash C sources under lz4libs/ when no system liblz4 is used. Those sources carry their own BSD-2-Clause license (Yann Collet), which was never included in the license files, MANIFEST.in, or setup.py metadata. Add lz4libs/LICENSE and lz4libs/LICENSE.xxhash with the upstream license text, declare them via license_files in setup.py so setuptools packages them into the wheel's dist-info/licenses/, list them in MANIFEST.in for the sdist, and document the vendored licensing in docs/license.rst. Fixes python-lz4#306
pctablet505
marked this pull request as ready for review
July 17, 2026 12:46
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.
What
The distributed wheel only ships the wrapper's own BSD-3-Clause
LICENSE. It doesn't include the license of the vendored lz4/xxHash C sources underlz4libs/, even though those sources are compiled directly into the extension modules when no systemliblz4is available. Confirmed by inspecting the published wheel on PyPI:dist-info/licenses/only contains the wrapper's own license.Change
lz4libs/LICENSE(lz4 library, BSD-2-Clause, Yann Collet) andlz4libs/LICENSE.xxhash(xxHash, same license family, separate copyright block) with the exact upstream license text.license_filesinsetup.pyso setuptools packages them into the wheel'sdist-info/licenses/alongside the existingLICENSE.MANIFEST.inso they're included in the sdist too.docs/license.rst.Testing
Rebuilt the sdist locally and confirmed
PKG-INFOnow lists all three files underLicense-File:, which is what setuptools uses to populatedist-info/licenses/in the wheel.Fixes #306