From 0f721f69f453ffe7ae8c84ab3662d515df5bcd92 Mon Sep 17 00:00:00 2001 From: Fabien LOISON Date: Fri, 15 Nov 2024 10:01:16 +0100 Subject: [PATCH] Test package build with Python 3.13 --- .github/workflows/gh-pages.yml | 2 +- .github/workflows/python-ci.yml | 2 +- .github/workflows/python-packages.yml | 46 ++++++++++++++------------- noxfile.py | 2 +- pyproject.toml | 3 ++ 5 files changed, 30 insertions(+), 25 deletions(-) create mode 100644 pyproject.toml diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index 927b2c9..399b1f1 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -22,7 +22,7 @@ jobs: - name: "Set up Python" uses: actions/setup-python@v5 with: - python-version: "3.12" + python-version: "3.13" - name: "Install Python dependencies" run: | diff --git a/.github/workflows/python-ci.yml b/.github/workflows/python-ci.yml index 711abd2..4e94def 100644 --- a/.github/workflows/python-ci.yml +++ b/.github/workflows/python-ci.yml @@ -11,7 +11,7 @@ jobs: strategy: matrix: - python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] + python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] name: "Build and test Pyguetzli" runs-on: ubuntu-latest diff --git a/.github/workflows/python-packages.yml b/.github/workflows/python-packages.yml index 0ff65c3..535ffa6 100644 --- a/.github/workflows/python-packages.yml +++ b/.github/workflows/python-packages.yml @@ -5,6 +5,8 @@ on: tags: - "v[0-9]+\\.[0-9]+\\.[0-9]+" - "v[0-9]+\\.[0-9]+\\.[0-9]+-[0-9]+" + branches: + - test-py313 jobs: @@ -23,7 +25,7 @@ jobs: - name: "Set up Python" uses: actions/setup-python@v5 with: - python-version: "3.12" + python-version: "3.13" - name: "Install python dependencies" run: | @@ -49,9 +51,9 @@ jobs: fail-fast: false matrix: os: - - ubuntu-22.04 - - windows-2019 - - macos-11 + - ubuntu-24.04 + - windows-2022 + - macos-13 steps: @@ -74,26 +76,26 @@ jobs: path: ./wheelhouse/*.whl retention-days: 1 - publish_pypi: +# publish_pypi: - name: "Publish packages on PyPI" - runs-on: ubuntu-latest - needs: - - build_sdist - - build_wheels +# name: "Publish packages on PyPI" +# runs-on: ubuntu-latest +# needs: +# - build_sdist +# - build_wheels - steps: +# steps: - - name: "Download artifacts" - uses: actions/download-artifact@v4 +# - name: "Download artifacts" +# uses: actions/download-artifact@v4 - - name: "Move packages to the dist/ folder" - run: | - mkdir dist/ - mv sdist/* dist/ - mv wheels-*/*.whl dist/ +# - name: "Move packages to the dist/ folder" +# run: | +# mkdir dist/ +# mv sdist/* dist/ +# mv wheels-*/*.whl dist/ - - name: "Publish packages on PyPI" - uses: pypa/gh-action-pypi-publish@release/v1 - with: - password: ${{ secrets.PYPI_API_TOKEN }} +# - name: "Publish packages on PyPI" +# uses: pypa/gh-action-pypi-publish@release/v1 +# with: +# password: ${{ secrets.PYPI_API_TOKEN }} diff --git a/noxfile.py b/noxfile.py index 72cdae8..0f17a6f 100644 --- a/noxfile.py +++ b/noxfile.py @@ -7,7 +7,7 @@ def lint(session): session.run("flake8", "pyguetzli", "test", "noxfile.py") -@nox.session(python=["3.8", "3.9", "3.10", "3.11", "3.12"], reuse_venv=True) +@nox.session(python=["3.9", "3.10", "3.11", "3.12", "3.13"], reuse_venv=True) def test(session): session.install("pytest") session.install(".[PIL]") diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..49c051f --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["setuptools<74"] +build-backend = "setuptools.build_meta"