diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 98345c2..9fcd091 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -93,7 +93,10 @@ jobs: - "3.12" - "3.13" - "3.14" - os: [ubuntu-latest, macos-latest, windows-latest] + os: [ubuntu-latest, macos-latest, windows-latest, windows-11-arm] + exclude: + - os: windows-11-arm + python-version: "3.10" steps: - name: checkout @@ -124,27 +127,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 }} - 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 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 AccessControl (macOS x86_64) if: > @@ -182,10 +182,17 @@ jobs: python setup.py build_ext -i python setup.py bdist_wheel + - name: Create AccessControl sdist + if: > + startsWith(runner.os, 'Linux') + && matrix.python-version == '3.14' + run: | + python setup.py sdist + - name: Install AccessControl and dependencies 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 AccessControl build @@ -195,7 +202,7 @@ jobs: - name: Upload AccessControl 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 @@ -206,18 +213,33 @@ jobs: if: > startsWith(runner.os, 'Mac') && !startsWith(matrix.python-version, 'pypy') - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 with: name: AccessControl-${{ runner.os }}-${{ matrix.python-version }}.whl path: dist/*arm64.whl - - name: Upload AccessControl wheel (all other platforms) - if: > - !startsWith(runner.os, 'Mac') - uses: actions/upload-artifact@v4 + - name: Upload AccessControl wheel (Windows) + if: startsWith(runner.os, 'Windows') + uses: actions/upload-artifact@v7 + with: + name: AccessControl-${{ runner.os }}-${{ matrix.python-version }}-${{ runner.arch }}.whl + path: dist/*whl + + - name: Upload AccessControl wheel (Linux) + if: startsWith(runner.os, 'Linux') + uses: actions/upload-artifact@v7 with: name: AccessControl-${{ runner.os }}-${{ matrix.python-version }}.whl path: dist/*whl + - name: Upload AccessControl sdist + if: > + startsWith(runner.os, 'Linux') + && matrix.python-version == '3.14' + uses: actions/upload-artifact@v7 + with: + name: AccessControl.tar.gz + path: dist/*gz + test: needs: build-package runs-on: ${{ matrix.os }} @@ -230,7 +252,10 @@ jobs: - "3.12" - "3.13" - "3.14" - os: [ubuntu-latest, macos-latest, windows-latest] + os: [ubuntu-latest, macos-latest, windows-latest, windows-11-arm] + exclude: + - os: windows-11-arm + python-version: "3.10" steps: - name: checkout @@ -261,31 +286,35 @@ 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 AccessControl wheel - uses: actions/download-artifact@v4 + - name: Download AccessControl wheel (Linux/macOS) + if: "!startsWith(runner.os, 'Windows')" + uses: actions/download-artifact@v8 with: name: AccessControl-${{ runner.os }}-${{ matrix.python-version }}.whl path: dist/ + + - name: Download AccessControl wheel (Windows) + if: startsWith(runner.os, 'Windows') + uses: actions/download-artifact@v8 + with: + name: AccessControl-${{ runner.os }}-${{ matrix.python-version }}-${{ runner.arch }}.whl + path: dist/ - name: Install AccessControl 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 @@ -361,25 +390,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 AccessControl wheel - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v8 with: name: AccessControl-${{ runner.os }}-${{ matrix.python-version }}.whl path: dist/ @@ -439,22 +464,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 @@ -477,7 +499,7 @@ jobs: bash .manylinux.sh - name: Upload AccessControl wheels - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 with: path: wheelhouse/*whl name: manylinux_${{ matrix.image }}_wheels.zip @@ -501,7 +523,7 @@ jobs: steps: - name: Download all wheel artifacts - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v8 with: path: dist/ pattern: '*' @@ -518,7 +540,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 b6f31e1..86df9e0 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 = false with-sphinx-doctests = false with-macos = false with-docs = false +with-free-threaded-python = false [tox] use-flake8 = true 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 a5f54b3..a2c02c1 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -7,6 +7,10 @@ For changes before version 3.0, see ``HISTORY.rst``. 7.4 (unreleased) ---------------- +- Add support for automatically building and publishing Windows/ARM64 wheels. + +- Add support for automatically building and publishing source distributions. + 7.3 (2025-11-16) ---------------- diff --git a/pyproject.toml b/pyproject.toml index c3b3c22..e0bb715 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -103,3 +103,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 5769c52..5239dad 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 # E402 module level import not at top of file diff --git a/tox.ini b/tox.ini index a8855a0..e65ca44 100644 --- a/tox.ini +++ b/tox.ini @@ -14,7 +14,7 @@ envlist = [testenv] deps = - setuptools >= 78.1.1,< 81 + setuptools >= 78.1.1,< 82 setenv = pure: PURE_PYTHON=1 !pure-!pypy3: PURE_PYTHON=0 @@ -52,7 +52,7 @@ deps = twine build check-manifest - check-python-versions >= 0.20.0 + check-python-versions >= 0.24.2 wheel commands_pre = commands =