Skip to content

Package licenses of vendored lz4 and xxHash sources - #344

Open
pctablet505 wants to merge 1 commit into
python-lz4:masterfrom
pctablet505:vendor-license-306
Open

Package licenses of vendored lz4 and xxHash sources#344
pctablet505 wants to merge 1 commit into
python-lz4:masterfrom
pctablet505:vendor-license-306

Conversation

@pctablet505

Copy link
Copy Markdown

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 under lz4libs/, even though those sources are compiled directly into the extension modules when no system liblz4 is available. Confirmed by inspecting the published wheel on PyPI: dist-info/licenses/ only contains the wrapper's own license.

Change

  • Add lz4libs/LICENSE (lz4 library, BSD-2-Clause, Yann Collet) and lz4libs/LICENSE.xxhash (xxHash, same license family, separate copyright block) with the exact upstream license text.
  • Declare both via license_files in setup.py so setuptools packages them into the wheel's dist-info/licenses/ alongside the existing LICENSE.
  • Add them to MANIFEST.in so they're included in the sdist too.
  • Document the vendored licensing in docs/license.rst.

Testing

Rebuilt the sdist locally and confirmed PKG-INFO now lists all three files under License-File:, which is what setuptools uses to populate dist-info/licenses/ in the wheel.

Fixes #306

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
pctablet505 marked this pull request as ready for review July 17, 2026 12:46
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.

Missing license of lz4libs in distributed python wheel

1 participant