From 8d6d0cae319012ae438a79440ac749eac8053ce3 Mon Sep 17 00:00:00 2001 From: Nathan Goldbaum Date: Thu, 22 Oct 2026 10:06:07 -0700 Subject: [PATCH] Include license in wheels and test fixtures in sdist --- .github/workflows/ci.yml | 22 +++++++++++++--------- MANIFEST.in | 9 ++++++++- README.rst | 5 ++--- setup.cfg | 1 + 4 files changed, 24 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0abf6c4..5854cc4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,6 +18,7 @@ jobs: test: runs-on: ${{ matrix.os }} + needs: package-sdist strategy: fail-fast: false matrix: @@ -32,22 +33,25 @@ jobs: ["3.14t", "py314t"], ] steps: - - name: Set git to use LF on Windows - if: runner.os == 'Windows' - run: | - git config --global core.autocrlf false - git config --global core.eol lf - - uses: actions/checkout@v5 - with: - submodules: recursive - uses: actions/setup-python@v6 with: python-version: ${{ matrix.python-version[0] }} allow-prereleases: true + - uses: actions/download-artifact@v6 + with: + name: sdist + path: dist/ + - name: Extract source package + shell: bash + run: | + mkdir source + tar -xzf dist/*.tar.gz -C source --strip-components=1 - name: Run tests + working-directory: source + shell: bash run: | python -m pip install tox - tox -e ${{ matrix.python-version[1] }} + tox -e ${{ matrix.python-version[1] }} --installpkg ../dist/*.tar.gz package-sdist: runs-on: ubuntu-latest diff --git a/MANIFEST.in b/MANIFEST.in index 8ee7ecc..46dd945 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -10,5 +10,12 @@ recursive-include libbrotli/c/dec *.c *.h *.cc recursive-include libbrotli/c/common *.c *.h *.cc recursive-include libbrotli/c/include *.c *.h *.cc -# Include test files +# Include test files, dependencies, and fixtures +include tox.ini test_requirements.txt recursive-include test/ *.py + +recursive-include libbrotli/tests/testdata * +# Exclude datasets and alternate encodings unused by brotlicffi's tests, +# saving about 12 MB of uncompressed test data. +exclude libbrotli/tests/testdata/bb.binast libbrotli/tests/testdata/random_chunks +exclude libbrotli/tests/testdata/*.compressed.* diff --git a/README.rst b/README.rst index 1eaa754..bf24a5c 100644 --- a/README.rst +++ b/README.rst @@ -79,9 +79,8 @@ libraries together to support Brotli with multiple Python implementations. License ------- -The source code of BrotliCFFI is available under the MIT license. Brotli itself -is made available under the Version 2.0 of the Apache Software License. See the -LICENSE and libbrotli/LICENSE files for more information. +The source code of BrotliCFFI and Brotli itself are available under the MIT +license. See the LICENSE and libbrotli/LICENSE files for more information. Authors ------- diff --git a/setup.cfg b/setup.cfg index 8b7eaaf..d3d94fa 100644 --- a/setup.cfg +++ b/setup.cfg @@ -6,3 +6,4 @@ markers = [metadata] license_files = LICENSE + libbrotli/LICENSE