diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index bdaa732..608abc9 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -95,10 +95,14 @@ jobs: - "3.13" - "3.14" - "3.15" - os: [ubuntu-latest, macos-latest, windows-latest] + os: [ubuntu-latest, macos-latest, windows-latest, windows-11-arm] exclude: - os: macos-latest python-version: "pypy-3.11" + - os: windows-11-arm + python-version: "pypy-3.11" + - os: windows-11-arm + python-version: "3.10" steps: - name: checkout @@ -129,33 +133,30 @@ jobs: echo "dir=$(pip cache dir)" >> $Env:GITHUB_OUTPUT - name: pip cache (default) - uses: actions/cache@v4 + uses: actions/cache@v5 if: ${{ !startsWith(runner.os, 'Windows') }} with: path: ${{ steps.pip-cache-default.outputs.dir }} - key: ${{ runner.os }}-pip-${{ matrix.python-version }} - restore-keys: | - ${{ runner.os }}-pip- + key: ${{ runner.os }}-${{ runner.arch }}-pip-${{ matrix.python-version }} - name: pip cache (Windows) - uses: actions/cache@v4 + uses: actions/cache@v5 if: ${{ startsWith(runner.os, 'Windows') }} with: path: ${{ steps.pip-cache-windows.outputs.dir }} - key: ${{ runner.os }}-pip-${{ matrix.python-version }} - restore-keys: | - ${{ runner.os }}-pip- + key: ${{ runner.os }}-${{ runner.arch }}-pip-${{ matrix.python-version }} + - name: Install Build Dependencies (3.15) if: matrix.python-version == '3.15' run: | pip install -U pip - pip install -U "setuptools >= 78.1.1,< 81" wheel twine + pip install -U "setuptools >= 78.1.1,< 82" wheel twine - name: Install Build Dependencies if: matrix.python-version != '3.15' run: | pip install -U pip - pip install -U "setuptools >= 78.1.1,< 81" wheel twine + pip install -U "setuptools >= 78.1.1,< 82" wheel twine - name: Build zope.i18nmessageid (macOS x86_64) if: > @@ -193,6 +194,13 @@ jobs: python setup.py build_ext -i python setup.py bdist_wheel + - name: Create zope.i18nmessageid sdist + if: > + startsWith(runner.os, 'Linux') + && matrix.python-version == '3.14' + run: | + python setup.py sdist + - name: Install zope.i18nmessageid and dependencies (3.15) if: matrix.python-version == '3.15' run: | @@ -204,7 +212,7 @@ jobs: if: matrix.python-version != '3.15' run: | # Install to collect dependencies into the (pip) cache. - pip install -U pip "setuptools >= 78.1.1,< 81" + pip install -U pip "setuptools >= 78.1.1,< 82" pip install .[test] - name: Check zope.i18nmessageid build @@ -214,7 +222,7 @@ jobs: - name: Upload zope.i18nmessageid wheel (macOS x86_64) if: > startsWith(runner.os, 'Mac') - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 with: # The x86_64 wheel is uploaded with a different name just so it can be # manually downloaded when desired. The wheel itself *cannot* be tested @@ -225,18 +233,33 @@ jobs: if: > startsWith(runner.os, 'Mac') && !startsWith(matrix.python-version, 'pypy') - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 with: name: zope.i18nmessageid-${{ runner.os }}-${{ matrix.python-version }}.whl path: dist/*arm64.whl - - name: Upload zope.i18nmessageid wheel (all other platforms) - if: > - !startsWith(runner.os, 'Mac') - uses: actions/upload-artifact@v4 + - name: Upload zope.i18nmessageid wheel (Windows) + if: startsWith(runner.os, 'Windows') + uses: actions/upload-artifact@v7 + with: + name: zope.i18nmessageid-${{ runner.os }}-${{ matrix.python-version }}-${{ runner.arch }}.whl + path: dist/*whl + + - name: Upload zope.i18nmessageid wheel (Linux) + if: startsWith(runner.os, 'Linux') + uses: actions/upload-artifact@v7 with: name: zope.i18nmessageid-${{ runner.os }}-${{ matrix.python-version }}.whl path: dist/*whl + - name: Upload zope.i18nmessageid sdist + if: > + startsWith(runner.os, 'Linux') + && matrix.python-version == '3.14' + uses: actions/upload-artifact@v7 + with: + name: zope.i18nmessageid.tar.gz + path: dist/*gz + test: needs: build-package runs-on: ${{ matrix.os }} @@ -251,10 +274,14 @@ jobs: - "3.13" - "3.14" - "3.15" - os: [ubuntu-latest, macos-latest, windows-latest] + os: [ubuntu-latest, macos-latest, windows-latest, windows-11-arm] exclude: - os: macos-latest python-version: "pypy-3.11" + - os: windows-11-arm + python-version: "pypy-3.11" + - os: windows-11-arm + python-version: "3.10" steps: - name: checkout @@ -285,32 +312,36 @@ jobs: echo "dir=$(pip cache dir)" >> $Env:GITHUB_OUTPUT - name: pip cache (default) - uses: actions/cache@v4 + uses: actions/cache@v5 if: ${{ !startsWith(runner.os, 'Windows') }} with: path: ${{ steps.pip-cache-default.outputs.dir }} - key: ${{ runner.os }}-pip-${{ matrix.python-version }} - restore-keys: | - ${{ runner.os }}-pip- + key: ${{ runner.os }}-${{ runner.arch }}-pip-${{ matrix.python-version }} - name: pip cache (Windows) - uses: actions/cache@v4 + uses: actions/cache@v5 if: ${{ startsWith(runner.os, 'Windows') }} with: path: ${{ steps.pip-cache-windows.outputs.dir }} - key: ${{ runner.os }}-pip-${{ matrix.python-version }} - restore-keys: | - ${{ runner.os }}-pip- + key: ${{ runner.os }}-${{ runner.arch }}-pip-${{ matrix.python-version }} - - name: Download zope.i18nmessageid wheel - uses: actions/download-artifact@v4 + - name: Download zope.i18nmessageid wheel (Linux/macOS) + if: "!startsWith(runner.os, 'Windows')" + uses: actions/download-artifact@v8 with: name: zope.i18nmessageid-${{ runner.os }}-${{ matrix.python-version }}.whl path: dist/ + + - name: Download zope.i18nmessageid wheel (Windows) + if: startsWith(runner.os, 'Windows') + uses: actions/download-artifact@v8 + with: + name: zope.i18nmessageid-${{ runner.os }}-${{ matrix.python-version }}-${{ runner.arch }}.whl + path: dist/ - name: Install zope.i18nmessageid ${{ matrix.python-version }} if: matrix.python-version == '3.15' run: | - pip install -U wheel "setuptools >= 78.1.1,< 81" + pip install -U wheel "setuptools >= 78.1.1,< 82" # coverage might have a wheel on PyPI for a future python version which is # not ABI compatible with the current one, so build it from sdist: pip install -U --no-binary :all: coverage[toml] @@ -325,7 +356,7 @@ jobs: - name: Install zope.i18nmessageid if: matrix.python-version != '3.15' run: | - pip install -U wheel "setuptools >= 78.1.1,< 81" + pip install -U wheel "setuptools >= 78.1.1,< 82" pip install -U coverage[toml] pip install -U 'cffi; platform_python_implementation == "CPython"' # Unzip into src/ so that testrunner can find the .so files @@ -401,25 +432,21 @@ jobs: echo "dir=$(pip cache dir)" >> $Env:GITHUB_OUTPUT - name: pip cache (default) - uses: actions/cache@v4 + uses: actions/cache@v5 if: ${{ !startsWith(runner.os, 'Windows') }} with: path: ${{ steps.pip-cache-default.outputs.dir }} - key: ${{ runner.os }}-pip-${{ matrix.python-version }} - restore-keys: | - ${{ runner.os }}-pip- + key: ${{ runner.os }}-${{ runner.arch }}-pip-${{ matrix.python-version }} - name: pip cache (Windows) - uses: actions/cache@v4 + uses: actions/cache@v5 if: ${{ startsWith(runner.os, 'Windows') }} with: path: ${{ steps.pip-cache-windows.outputs.dir }} - key: ${{ runner.os }}-pip-${{ matrix.python-version }} - restore-keys: | - ${{ runner.os }}-pip- + key: ${{ runner.os }}-${{ runner.arch }}-pip-${{ matrix.python-version }} - name: Download zope.i18nmessageid wheel - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v8 with: name: zope.i18nmessageid-${{ runner.os }}-${{ matrix.python-version }}.whl path: dist/ @@ -472,25 +499,21 @@ jobs: echo "dir=$(pip cache dir)" >> $Env:GITHUB_OUTPUT - name: pip cache (default) - uses: actions/cache@v4 + uses: actions/cache@v5 if: ${{ !startsWith(runner.os, 'Windows') }} with: path: ${{ steps.pip-cache-default.outputs.dir }} - key: ${{ runner.os }}-pip-${{ matrix.python-version }} - restore-keys: | - ${{ runner.os }}-pip- + key: ${{ runner.os }}-${{ runner.arch }}-pip-${{ matrix.python-version }} - name: pip cache (Windows) - uses: actions/cache@v4 + uses: actions/cache@v5 if: ${{ startsWith(runner.os, 'Windows') }} with: path: ${{ steps.pip-cache-windows.outputs.dir }} - key: ${{ runner.os }}-pip-${{ matrix.python-version }} - restore-keys: | - ${{ runner.os }}-pip- + key: ${{ runner.os }}-${{ runner.arch }}-pip-${{ matrix.python-version }} - name: Download zope.i18nmessageid wheel - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v8 with: name: zope.i18nmessageid-${{ runner.os }}-${{ matrix.python-version }}.whl path: dist/ @@ -550,22 +573,19 @@ jobs: echo "dir=$(pip cache dir)" >> $Env:GITHUB_OUTPUT - name: pip cache (default) - uses: actions/cache@v4 + uses: actions/cache@v5 if: ${{ !startsWith(runner.os, 'Windows') }} with: path: ${{ steps.pip-cache-default.outputs.dir }} key: ${{ runner.os }}-pip_manylinux-${{ matrix.image }}-${{ matrix.python-version }} - restore-keys: | - ${{ runner.os }}-pip- - name: pip cache (Windows) - uses: actions/cache@v4 + uses: actions/cache@v5 if: ${{ startsWith(runner.os, 'Windows') }} with: path: ${{ steps.pip-cache-windows.outputs.dir }} key: ${{ runner.os }}-pip_manylinux-${{ matrix.image }}-${{ matrix.python-version }} - restore-keys: | - ${{ runner.os }}-pip- + - name: Update pip run: pip install -U pip @@ -588,7 +608,7 @@ jobs: bash .manylinux.sh - name: Upload zope.i18nmessageid wheels - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 with: path: wheelhouse/*whl name: manylinux_${{ matrix.image }}_wheels.zip @@ -615,7 +635,7 @@ jobs: steps: - name: Download all wheel artifacts - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v8 with: path: dist/ pattern: '*' @@ -632,7 +652,7 @@ jobs: # PyPy wheels shouldn't be uploaded, remove them if present find dist/ -name "*pypy*" -type f -delete || true find dist/ -name "*none-any*" -type f -delete || true - # Wheels for the no-yet-supported future Python version need to go + # Wheels for the not-yet-supported future Python version need to go find dist/ -name "*3.15*" -type f -delete || true find dist/ -name "*cp315*" -type f -delete || true # For Linux, we only want the manylinux wheels diff --git a/.gitignore b/.gitignore index 07212fd..c9557a8 100644 --- a/.gitignore +++ b/.gitignore @@ -28,5 +28,6 @@ lib64 log/ parts/ pyvenv.cfg +share/ testing.log var/ diff --git a/.meta.toml b/.meta.toml index f397604..85ac50b 100644 --- a/.meta.toml +++ b/.meta.toml @@ -2,7 +2,7 @@ # https://github.com/zopefoundation/meta/tree/master/src/zope/meta/c-code [meta] template = "c-code" -commit-id = "f62d8bab" +commit-id = "2c0272ea" [python] with-windows = true @@ -11,6 +11,7 @@ with-future-python = true with-docs = true with-sphinx-doctests = true with-macos = false +with-free-threaded-python = false [coverage] fail-under = 95 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e120a3d..59609e1 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,7 +3,7 @@ minimum_pre_commit_version: '3.6' repos: - repo: https://github.com/pycqa/isort - rev: "7.0.0" + rev: "8.0.1" hooks: - id: isort - repo: https://github.com/hhatto/autopep8 @@ -12,7 +12,7 @@ repos: - id: autopep8 args: [--in-place, --aggressive, --aggressive] - repo: https://github.com/asottile/pyupgrade - rev: v3.21.0 + rev: v3.21.2 hooks: - id: pyupgrade args: [--py310-plus] @@ -20,6 +20,7 @@ repos: rev: 0.4.3 hooks: - id: teyit + language_version: python3.13 - repo: https://github.com/PyCQA/flake8 rev: "7.3.0" hooks: diff --git a/CHANGES.rst b/CHANGES.rst index 1f5b9d4..3e6d3f2 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -4,6 +4,10 @@ Change log 8.3 (unreleased) ---------------- +- Add support for automatically building and publishing Windows/ARM64 wheels. + +- Add support for automatically building and publishing source distributions. + 8.2 (2025-11-18) ---------------- diff --git a/pyproject.toml b/pyproject.toml index 24be533..bf03fd7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -94,3 +94,7 @@ source = [ [tool.setuptools.dynamic] readme = {file = ["README.rst", "CHANGES.rst"]} + +[tool.zest-releaser] +create-wheel = false +upload-pypi = false diff --git a/setup.cfg b/setup.cfg index fd4f119..9052d2b 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,9 +1,5 @@ # Generated with zope.meta (https://zopemeta.readthedocs.io/) from: # https://github.com/zopefoundation/meta/tree/master/src/zope/meta/c-code - -[zest.releaser] -create-wheel = no - [flake8] doctests = 1 # F401 imported but unused diff --git a/tox.ini b/tox.ini index d4498b1..363238a 100644 --- a/tox.ini +++ b/tox.ini @@ -18,7 +18,7 @@ envlist = [testenv] pip_pre = py315: true deps = - setuptools >= 78.1.1,< 81 + setuptools >= 78.1.1,< 82 Sphinx setenv = pure: PURE_PYTHON=1 @@ -59,7 +59,7 @@ deps = twine build check-manifest - check-python-versions >= 0.20.0 + check-python-versions >= 0.24.2 wheel commands_pre = commands =