diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 9ad8ca4..7fe806c 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,33 @@ 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 }} + key: ${{ runner.os }}-${{ runner.arch }}-pip-${{ matrix.python-version }} restore-keys: | - ${{ runner.os }}-pip- + ${{ runner.os }}-${{ runner.arch }}-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-${{ matrix.python-version }} + key: ${{ runner.os }}-${{ runner.arch }}-pip-${{ matrix.python-version }} restore-keys: | - ${{ runner.os }}-pip- + ${{ runner.os }}-${{ runner.arch }}-pip- - 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.proxy (macOS x86_64) if: > @@ -193,6 +197,13 @@ jobs: python setup.py build_ext -i python setup.py bdist_wheel + - name: Create zope.proxy sdist + if: > + startsWith(runner.os, 'Linux') + && matrix.python-version == '3.14' + run: | + python setup.py sdist + - name: Install zope.proxy and dependencies (3.15) if: matrix.python-version == '3.15' run: | @@ -204,7 +215,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.proxy build @@ -214,7 +225,7 @@ jobs: - name: Upload zope.proxy 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 +236,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.proxy-${{ runner.os }}-${{ matrix.python-version }}.whl path: dist/*arm64.whl - - name: Upload zope.proxy wheel (all other platforms) - if: > - !startsWith(runner.os, 'Mac') - uses: actions/upload-artifact@v4 + - name: Upload zope.proxy wheel (Windows) + if: startsWith(runner.os, 'Windows') + uses: actions/upload-artifact@v7 + with: + name: zope.proxy-${{ runner.os }}-${{ matrix.python-version }}-${{ runner.arch }}.whl + path: dist/*whl + + - name: Upload zope.proxy wheel (Linux) + if: startsWith(runner.os, 'Linux') + uses: actions/upload-artifact@v7 with: name: zope.proxy-${{ runner.os }}-${{ matrix.python-version }}.whl path: dist/*whl + - name: Upload zope.proxy sdist + if: > + startsWith(runner.os, 'Linux') + && matrix.python-version == '3.14' + uses: actions/upload-artifact@v7 + with: + name: zope.proxy.tar.gz + path: dist/*gz + test: needs: build-package runs-on: ${{ matrix.os }} @@ -251,10 +277,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 +315,39 @@ 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 }} + key: ${{ runner.os }}-${{ runner.arch }}-pip-${{ matrix.python-version }} restore-keys: | - ${{ runner.os }}-pip- + ${{ runner.os }}-${{ runner.arch }}-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-${{ matrix.python-version }} + key: ${{ runner.os }}-${{ runner.arch }}-pip-${{ matrix.python-version }} restore-keys: | - ${{ runner.os }}-pip- - - - name: Download zope.proxy wheel - uses: actions/download-artifact@v4 + ${{ runner.os }}-${{ runner.arch }}-pip- + - name: Download zope.proxy wheel (Linux/macOS) + if: "!startsWith(runner.os, 'Windows')" + uses: actions/download-artifact@v8 with: name: zope.proxy-${{ runner.os }}-${{ matrix.python-version }}.whl path: dist/ + + - name: Download zope.proxy wheel (Windows) + if: startsWith(runner.os, 'Windows') + uses: actions/download-artifact@v8 + with: + name: zope.proxy-${{ runner.os }}-${{ matrix.python-version }}-${{ runner.arch }}.whl + path: dist/ - name: Install zope.proxy ${{ 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 +362,7 @@ jobs: - name: Install zope.proxy 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 +438,24 @@ 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 }} + key: ${{ runner.os }}-${{ runner.arch }}-pip-${{ matrix.python-version }} restore-keys: | - ${{ runner.os }}-pip- + ${{ runner.os }}-${{ runner.arch }}-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-${{ matrix.python-version }} + key: ${{ runner.os }}-${{ runner.arch }}-pip-${{ matrix.python-version }} restore-keys: | - ${{ runner.os }}-pip- - + ${{ runner.os }}-${{ runner.arch }}-pip- - name: Download zope.proxy wheel - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v8 with: name: zope.proxy-${{ runner.os }}-${{ matrix.python-version }}.whl path: dist/ @@ -472,25 +508,24 @@ 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 }} + key: ${{ runner.os }}-${{ runner.arch }}-pip-${{ matrix.python-version }} restore-keys: | - ${{ runner.os }}-pip- + ${{ runner.os }}-${{ runner.arch }}-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-${{ matrix.python-version }} + key: ${{ runner.os }}-${{ runner.arch }}-pip-${{ matrix.python-version }} restore-keys: | - ${{ runner.os }}-pip- - + ${{ runner.os }}-${{ runner.arch }}-pip- - name: Download zope.proxy wheel - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v8 with: name: zope.proxy-${{ runner.os }}-${{ matrix.python-version }}.whl path: dist/ @@ -550,22 +585,22 @@ 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- + ${{ runner.os }}-${{ runner.arch }}-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- + ${{ runner.os }}-${{ runner.arch }}-pip- - name: Update pip run: pip install -U pip @@ -588,7 +623,7 @@ jobs: bash .manylinux.sh - name: Upload zope.proxy wheels - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 with: path: wheelhouse/*whl name: manylinux_${{ matrix.image }}_wheels.zip @@ -615,7 +650,7 @@ jobs: steps: - name: Download all wheel artifacts - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v8 with: path: dist/ pattern: '*' @@ -632,7 +667,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 7cff01d..6ba59c0 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 = "f472bcc5" [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 [tox] use-flake8 = true diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 807033a..20a3002 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] @@ -21,6 +21,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 5dafa48..4b8364b 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -4,7 +4,9 @@ Change log 7.2 (unreleased) ---------------- -- Nothing changed yet. +- Add support for automatically building and publishing Windows/ARM64 wheels. + +- Add support for automatically building and publishing source distributions. 7.1 (2025-11-18) 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 =