From 59c7ef17cadfb9647b27d30155db372528bec51a Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Thu, 9 Oct 2025 10:47:43 +0200 Subject: [PATCH 1/6] GitHub Actions: Modernize versions of GitHub Actions and Python --- .github/workflows/ci.yml | 41 ++++++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 20 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0279380..4ab473a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,12 +5,12 @@ jobs: lint: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v5 with: submodules: recursive - - uses: actions/setup-python@v1 + - uses: actions/setup-python@v6 with: - python-version: 3.8 + python-version: 3.x - name: Run lint run: | python -m pip install tox @@ -22,17 +22,17 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, macos-latest, windows-latest] - python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"] + python-version: ["3.10", "3.11", "3.12", "3.13", "3.14", "3.14t"] 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@v2 + - uses: actions/checkout@v5 with: submodules: recursive - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v6 with: python-version: ${{ matrix.python-version }} allow-prereleases: true @@ -44,16 +44,16 @@ jobs: package-sdist: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v5 with: submodules: recursive - - uses: actions/setup-python@v1 + - uses: actions/setup-python@v6 with: python-version: 3.x - name: Build source package run: python setup.py sdist - name: Upload source package - uses: actions/upload-artifact@v1 + uses: actions/upload-artifact@v4 with: name: sdist path: dist/ @@ -71,11 +71,12 @@ jobs: os: windows-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v5 with: submodules: recursive - - uses: actions/setup-python@v2 - + - uses: actions/setup-python@v6 + with: + python-version: 3.x - name: Install cibuildwheel run: python -m pip install cibuildwheel # - name: Install Visual C++ for Python 2.7 @@ -91,16 +92,16 @@ jobs: if: runner.os == 'Windows' run: python -m cibuildwheel --output-dir wheelhouse env: - CIBW_BUILD: cp37-${{ matrix.name }}* pp*-${{ matrix.name }}* + CIBW_BUILD: cp310-${{ matrix.name }}* pp*-${{ matrix.name }}* - name: Build wheels for Linux and macOS if: runner.os != 'Windows' run: python -m cibuildwheel --output-dir wheelhouse env: - CIBW_BUILD: cp37-${{ matrix.name }}* pp*-${{ matrix.name }}* + CIBW_BUILD: cp310-${{ matrix.name }}* pp*-${{ matrix.name }}* CIBW_ARCHS_LINUX: auto aarch64 CIBW_BEFORE_BUILD_LINUX: yum install -y libffi-devel - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v4 with: name: wheels-${{ matrix.name }} path: ./wheelhouse/*.whl @@ -109,20 +110,20 @@ jobs: runs-on: ubuntu-latest needs: [lint, test, package-sdist, package-wheel] steps: - - uses: actions/checkout@v2 - - uses: actions/download-artifact@v1 + - uses: actions/checkout@v5 + - uses: actions/download-artifact@v5 with: name: sdist path: dist/ - - uses: actions/download-artifact@v1 + - uses: actions/download-artifact@v5 with: name: wheels-win path: dist/ - - uses: actions/download-artifact@v1 + - uses: actions/download-artifact@v5 with: name: wheels-macos path: dist/ - - uses: actions/download-artifact@v1 + - uses: actions/download-artifact@v5 with: name: wheels-manylinux path: dist/ From 86a081b35022755d3865ff5a604bc536d6dbabcc Mon Sep 17 00:00:00 2001 From: Nathan Goldbaum Date: Mon, 20 Oct 2025 15:39:14 -0600 Subject: [PATCH 2/6] drop support for only Python 3.7 --- .github/workflows/ci.yml | 14 +++++++++----- setup.py | 3 +-- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4ab473a..e06a2c0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,7 +22,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, macos-latest, windows-latest] - python-version: ["3.10", "3.11", "3.12", "3.13", "3.14", "3.14t"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] steps: - name: Set git to use LF on Windows if: runner.os == 'Windows' @@ -51,7 +51,9 @@ jobs: with: python-version: 3.x - name: Build source package - run: python setup.py sdist + run: | + pip install build + python -m build --sdist - name: Upload source package uses: actions/upload-artifact@v4 with: @@ -65,7 +67,7 @@ jobs: include: - name: manylinux os: ubuntu-latest - - name: macos + - name: macosx os: macos-latest - name: win os: windows-latest @@ -92,13 +94,15 @@ jobs: if: runner.os == 'Windows' run: python -m cibuildwheel --output-dir wheelhouse env: - CIBW_BUILD: cp310-${{ matrix.name }}* pp*-${{ matrix.name }}* + CIBW_BUILD: cp38-${{ matrix.name }}* pp*-${{ matrix.name }}* + CIBW_ENABLE: pypy - name: Build wheels for Linux and macOS if: runner.os != 'Windows' run: python -m cibuildwheel --output-dir wheelhouse env: - CIBW_BUILD: cp310-${{ matrix.name }}* pp*-${{ matrix.name }}* + CIBW_BUILD: cp38-${{ matrix.name }}* pp*-${{ matrix.name }}* + CIBW_ENABLE: pypy CIBW_ARCHS_LINUX: auto aarch64 CIBW_BEFORE_BUILD_LINUX: yum install -y libffi-devel - uses: actions/upload-artifact@v4 diff --git a/setup.py b/setup.py index c545fd1..61748fd 100644 --- a/setup.py +++ b/setup.py @@ -98,7 +98,7 @@ def finalize_options(self): install_requires=[ "cffi>=1.0.0", ], - python_requires=">=3.7", + python_requires=">=3.8", cffi_modules=["src/brotlicffi/_build.py:ffi"], packages=find_packages('src'), package_dir={'': 'src'}, @@ -113,7 +113,6 @@ def finalize_options(self): "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", From ff919def0097109ea8baba2d2e857248a80ed363 Mon Sep 17 00:00:00 2001 From: Nathan Goldbaum Date: Tue, 21 Oct 2025 10:41:14 -0600 Subject: [PATCH 3/6] fix mac publish name --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e06a2c0..42b530a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -125,7 +125,7 @@ jobs: path: dist/ - uses: actions/download-artifact@v5 with: - name: wheels-macos + name: wheels-macosx path: dist/ - uses: actions/download-artifact@v5 with: From 517537ff086218d2d7f64bc85432fd150fa2e3b5 Mon Sep 17 00:00:00 2001 From: Nathan Goldbaum Date: Tue, 28 Oct 2025 12:47:50 -0600 Subject: [PATCH 4/6] use newer upload/download artifact major versions --- .github/workflows/ci.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 42b530a..df6062a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -55,7 +55,7 @@ jobs: pip install build python -m build --sdist - name: Upload source package - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v5 with: name: sdist path: dist/ @@ -115,19 +115,19 @@ jobs: needs: [lint, test, package-sdist, package-wheel] steps: - uses: actions/checkout@v5 - - uses: actions/download-artifact@v5 + - uses: actions/download-artifact@v6 with: name: sdist path: dist/ - - uses: actions/download-artifact@v5 + - uses: actions/download-artifact@v6 with: name: wheels-win path: dist/ - - uses: actions/download-artifact@v5 + - uses: actions/download-artifact@v6 with: name: wheels-macosx path: dist/ - - uses: actions/download-artifact@v5 + - uses: actions/download-artifact@v6 with: name: wheels-manylinux path: dist/ From b0a640f19c374d1a13590389052541579e786cd8 Mon Sep 17 00:00:00 2001 From: Nathan Goldbaum Date: Tue, 28 Oct 2025 12:48:21 -0600 Subject: [PATCH 5/6] simplify cibuildwheel configuration --- .github/workflows/ci.yml | 28 +++++++--------------------- 1 file changed, 7 insertions(+), 21 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index df6062a..2d79ab2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -64,13 +64,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - include: - - name: manylinux - os: ubuntu-latest - - name: macosx - os: macos-latest - - name: win - os: windows-latest + os: [ubuntu-latest, macos-latest, windows-latest] steps: - uses: actions/checkout@v5 @@ -90,24 +84,16 @@ jobs: with: platforms: all - - name: Build wheels for Windows # see issue #174 - if: runner.os == 'Windows' - run: python -m cibuildwheel --output-dir wheelhouse - env: - CIBW_BUILD: cp38-${{ matrix.name }}* pp*-${{ matrix.name }}* - CIBW_ENABLE: pypy - - - name: Build wheels for Linux and macOS - if: runner.os != 'Windows' + - name: Build wheels run: python -m cibuildwheel --output-dir wheelhouse env: - CIBW_BUILD: cp38-${{ matrix.name }}* pp*-${{ matrix.name }}* + CIBW_BUILD: cp38-* pp*-* CIBW_ENABLE: pypy CIBW_ARCHS_LINUX: auto aarch64 CIBW_BEFORE_BUILD_LINUX: yum install -y libffi-devel - uses: actions/upload-artifact@v4 with: - name: wheels-${{ matrix.name }} + name: wheels-${{ matrix.os }} path: ./wheelhouse/*.whl publish: @@ -121,15 +107,15 @@ jobs: path: dist/ - uses: actions/download-artifact@v6 with: - name: wheels-win + name: wheels-windows-latest path: dist/ - uses: actions/download-artifact@v6 with: - name: wheels-macosx + name: wheels-macos-latest path: dist/ - uses: actions/download-artifact@v6 with: - name: wheels-manylinux + name: wheels-ubuntu-latest path: dist/ - name: Publish to PyPI if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/') From 67f3aa0d01da5de040355778328ae922898fd3c2 Mon Sep 17 00:00:00 2001 From: Nathan Goldbaum Date: Tue, 28 Oct 2025 10:23:57 -0600 Subject: [PATCH 6/6] skip mussllinux, needs work to adjust for lack of yum --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2d79ab2..c5a195c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -88,6 +88,7 @@ jobs: run: python -m cibuildwheel --output-dir wheelhouse env: CIBW_BUILD: cp38-* pp*-* + CIBW_SKIP: "*musllinux*" CIBW_ENABLE: pypy CIBW_ARCHS_LINUX: auto aarch64 CIBW_BEFORE_BUILD_LINUX: yum install -y libffi-devel