Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
130 changes: 75 additions & 55 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,14 @@ 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: macos-latest
python-version: "pypy-3.11"
- os: windows-11-arm
python-version: "pypy-3.11"
- os: windows-11-arm
python-version: "3.10"
include:
- python-version: "3.14t"
os: ubuntu-latest
Expand Down Expand Up @@ -131,27 +135,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 persistent (macOS x86_64)
if: >
Expand Down Expand Up @@ -189,10 +190,17 @@ jobs:
python setup.py build_ext -i
python setup.py bdist_wheel

- name: Create persistent sdist
if: >
startsWith(runner.os, 'Linux')
&& matrix.python-version == '3.14'
run: |
python setup.py sdist

- name: Install persistent 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 persistent build
Expand All @@ -202,7 +210,7 @@ jobs:
- name: Upload persistent 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
Expand All @@ -213,18 +221,33 @@ jobs:
if: >
startsWith(runner.os, 'Mac')
&& !startsWith(matrix.python-version, 'pypy')
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: persistent-${{ runner.os }}-${{ matrix.python-version }}.whl
path: dist/*arm64.whl
- name: Upload persistent wheel (all other platforms)
if: >
!startsWith(runner.os, 'Mac')
uses: actions/upload-artifact@v4
- name: Upload persistent wheel (Windows)
if: startsWith(runner.os, 'Windows')
uses: actions/upload-artifact@v7
with:
name: persistent-${{ runner.os }}-${{ matrix.python-version }}-${{ runner.arch }}.whl
path: dist/*whl

- name: Upload persistent wheel (Linux)
if: startsWith(runner.os, 'Linux')
uses: actions/upload-artifact@v7
with:
name: persistent-${{ runner.os }}-${{ matrix.python-version }}.whl
path: dist/*whl

- name: Upload persistent sdist
if: >
startsWith(runner.os, 'Linux')
&& matrix.python-version == '3.14'
uses: actions/upload-artifact@v7
with:
name: persistent.tar.gz
path: dist/*gz

test:
needs: build-package
runs-on: ${{ matrix.os }}
Expand All @@ -238,10 +261,14 @@ 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: macos-latest
python-version: "pypy-3.11"
- os: windows-11-arm
python-version: "pypy-3.11"
- os: windows-11-arm
python-version: "3.10"
include:
- python-version: "3.14t"
os: ubuntu-latest
Expand Down Expand Up @@ -275,31 +302,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 persistent wheel
uses: actions/download-artifact@v4
- name: Download persistent wheel (Linux/macOS)
if: "!startsWith(runner.os, 'Windows')"
uses: actions/download-artifact@v8
with:
name: persistent-${{ runner.os }}-${{ matrix.python-version }}.whl
path: dist/

- name: Download persistent wheel (Windows)
if: startsWith(runner.os, 'Windows')
uses: actions/download-artifact@v8
with:
name: persistent-${{ runner.os }}-${{ matrix.python-version }}-${{ runner.arch }}.whl
path: dist/
- name: Install persistent
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
Expand Down Expand Up @@ -375,25 +406,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 persistent wheel
uses: actions/download-artifact@v4
uses: actions/download-artifact@v8
with:
name: persistent-${{ runner.os }}-${{ matrix.python-version }}.whl
path: dist/
Expand Down Expand Up @@ -446,25 +473,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 persistent wheel
uses: actions/download-artifact@v4
uses: actions/download-artifact@v8
with:
name: persistent-${{ runner.os }}-${{ matrix.python-version }}.whl
path: dist/
Expand Down Expand Up @@ -524,22 +547,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
Expand All @@ -562,7 +582,7 @@ jobs:
bash .manylinux.sh

- name: Upload persistent wheels
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
path: wheelhouse/*whl
name: manylinux_${{ matrix.image }}_wheels.zip
Expand All @@ -586,7 +606,7 @@ jobs:

steps:
- name: Download all wheel artifacts
uses: actions/download-artifact@v4
uses: actions/download-artifact@v8
with:
path: dist/
pattern: '*'
Expand Down
2 changes: 1 addition & 1 deletion .meta.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# https://github.com/zopefoundation/meta/tree/master/src/zope/meta/c-code
[meta]
template = "c-code"
commit-id = "2dc4f53b"
commit-id = "2c0272ea"

[python]
with-windows = true
Expand Down
3 changes: 2 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down
4 changes: 4 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ Change log
6.6 (unreleased)
----------------

- Add support for automatically building and publishing Windows/ARM64 wheels.

- Add support for automatically building and publishing source distributions.

- Fix compilation on free-threaded Python 3.14t: replace direct
``ob_refcnt``/``ob_type`` struct access with ``Py_REFCNT()``/``Py_TYPE()``
API macros, fix ``Py_BuildValue`` format strings for ``Py_ssize_t``.
Expand Down
4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -97,3 +97,7 @@ source = [

[tool.setuptools.dynamic]
readme = {file = ["README.rst", "CHANGES.rst"]}

[tool.zest-releaser]
create-wheel = false
upload-pypi = false
4 changes: 0 additions & 4 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -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

Expand Down
6 changes: 3 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ envlist =

[testenv]
deps =
setuptools >= 78.1.1,< 81
setuptools >= 78.1.1,< 82
setenv =
pure: PURE_PYTHON=1
!pure-!pypy3: PURE_PYTHON=0
Expand Down Expand Up @@ -60,12 +60,12 @@ deps =
twine
build
check-manifest
check-python-versions >= 0.20.0
check-python-versions >= 0.24.2
wheel
commands_pre =
commands =
check-manifest
check-python-versions --only pyproject.toml,setup.py,tox.ini
check-python-versions --only pyproject.toml,setup.py,tox.ini,.github/workflows/tests.yml
python -m build --sdist --no-isolation
twine check dist/*

Expand Down
Loading