Skip to content

Commit 3eac19b

Browse files
committed
Update zope.meta templates, support Windows/ARM64 and source dists
1 parent 83e1f57 commit 3eac19b

5 files changed

Lines changed: 93 additions & 53 deletions

File tree

.github/workflows/tests.yml

Lines changed: 83 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,14 @@ jobs:
9494
- "3.12"
9595
- "3.13"
9696
- "3.14"
97-
os: [ubuntu-latest, macos-latest, windows-latest]
97+
os: [ubuntu-latest, macos-latest, windows-latest, windows-11-arm]
9898
exclude:
9999
- os: macos-latest
100100
python-version: "pypy-3.11"
101+
- os: windows-11-arm
102+
python-version: "pypy-3.11"
103+
- os: windows-11-arm
104+
python-version: "3.10"
101105
include:
102106
- python-version: "3.14t"
103107
os: ubuntu-latest
@@ -131,27 +135,27 @@ jobs:
131135
echo "dir=$(pip cache dir)" >> $Env:GITHUB_OUTPUT
132136
133137
- name: pip cache (default)
134-
uses: actions/cache@v4
138+
uses: actions/cache@v5
135139
if: ${{ !startsWith(runner.os, 'Windows') }}
136140
with:
137141
path: ${{ steps.pip-cache-default.outputs.dir }}
138-
key: ${{ runner.os }}-pip-${{ matrix.python-version }}
142+
key: ${{ runner.os }}-${{ runner.arch }}-pip-${{ matrix.python-version }}
139143
restore-keys: |
140-
${{ runner.os }}-pip-
144+
${{ runner.os }}-${{ runner.arch }}-pip-
141145
142146
- name: pip cache (Windows)
143-
uses: actions/cache@v4
147+
uses: actions/cache@v5
144148
if: ${{ startsWith(runner.os, 'Windows') }}
145149
with:
146150
path: ${{ steps.pip-cache-windows.outputs.dir }}
147-
key: ${{ runner.os }}-pip-${{ matrix.python-version }}
151+
key: ${{ runner.os }}-${{ runner.arch }}-pip-${{ matrix.python-version }}
148152
restore-keys: |
149-
${{ runner.os }}-pip-
153+
${{ runner.os }}-${{ runner.arch }}-pip-
150154
151155
- name: Install Build Dependencies
152156
run: |
153157
pip install -U pip
154-
pip install -U "setuptools >= 78.1.1,< 81" wheel twine
158+
pip install -U "setuptools >= 78.1.1,< 82" wheel twine
155159
156160
- name: Build persistent (macOS x86_64)
157161
if: >
@@ -189,10 +193,17 @@ jobs:
189193
python setup.py build_ext -i
190194
python setup.py bdist_wheel
191195
196+
- name: Create persistent sdist
197+
if: >
198+
startsWith(runner.os, 'Linux')
199+
&& matrix.python-version == '3.14'
200+
run: |
201+
python setup.py sdist
202+
192203
- name: Install persistent and dependencies
193204
run: |
194205
# Install to collect dependencies into the (pip) cache.
195-
pip install -U pip "setuptools >= 78.1.1,< 81"
206+
pip install -U pip "setuptools >= 78.1.1,< 82"
196207
pip install .[test]
197208
198209
- name: Check persistent build
@@ -202,7 +213,7 @@ jobs:
202213
- name: Upload persistent wheel (macOS x86_64)
203214
if: >
204215
startsWith(runner.os, 'Mac')
205-
uses: actions/upload-artifact@v4
216+
uses: actions/upload-artifact@v7
206217
with:
207218
# The x86_64 wheel is uploaded with a different name just so it can be
208219
# manually downloaded when desired. The wheel itself *cannot* be tested
@@ -213,18 +224,33 @@ jobs:
213224
if: >
214225
startsWith(runner.os, 'Mac')
215226
&& !startsWith(matrix.python-version, 'pypy')
216-
uses: actions/upload-artifact@v4
227+
uses: actions/upload-artifact@v7
217228
with:
218229
name: persistent-${{ runner.os }}-${{ matrix.python-version }}.whl
219230
path: dist/*arm64.whl
220-
- name: Upload persistent wheel (all other platforms)
221-
if: >
222-
!startsWith(runner.os, 'Mac')
223-
uses: actions/upload-artifact@v4
231+
- name: Upload persistent wheel (Windows)
232+
if: startsWith(runner.os, 'Windows')
233+
uses: actions/upload-artifact@v7
234+
with:
235+
name: persistent-${{ runner.os }}-${{ matrix.python-version }}-${{ runner.arch }}.whl
236+
path: dist/*whl
237+
238+
- name: Upload persistent wheel (Linux)
239+
if: startsWith(runner.os, 'Linux')
240+
uses: actions/upload-artifact@v7
224241
with:
225242
name: persistent-${{ runner.os }}-${{ matrix.python-version }}.whl
226243
path: dist/*whl
227244

245+
- name: Upload persistent sdist
246+
if: >
247+
startsWith(runner.os, 'Linux')
248+
&& matrix.python-version == '3.14'
249+
uses: actions/upload-artifact@v7
250+
with:
251+
name: persistent-${{ github.ref_name }}.tar.gz
252+
path: dist/*gz
253+
228254
test:
229255
needs: build-package
230256
runs-on: ${{ matrix.os }}
@@ -238,10 +264,14 @@ jobs:
238264
- "3.12"
239265
- "3.13"
240266
- "3.14"
241-
os: [ubuntu-latest, macos-latest, windows-latest]
267+
os: [ubuntu-latest, macos-latest, windows-latest, windows-11-arm]
242268
exclude:
243269
- os: macos-latest
244270
python-version: "pypy-3.11"
271+
- os: windows-11-arm
272+
python-version: "pypy-3.11"
273+
- os: windows-11-arm
274+
python-version: "3.10"
245275
include:
246276
- python-version: "3.14t"
247277
os: ubuntu-latest
@@ -275,31 +305,38 @@ jobs:
275305
echo "dir=$(pip cache dir)" >> $Env:GITHUB_OUTPUT
276306
277307
- name: pip cache (default)
278-
uses: actions/cache@v4
308+
uses: actions/cache@v5
279309
if: ${{ !startsWith(runner.os, 'Windows') }}
280310
with:
281311
path: ${{ steps.pip-cache-default.outputs.dir }}
282-
key: ${{ runner.os }}-pip-${{ matrix.python-version }}
312+
key: ${{ runner.os }}-${{ runner.arch }}-pip-${{ matrix.python-version }}
283313
restore-keys: |
284-
${{ runner.os }}-pip-
314+
${{ runner.os }}-${{ runner.arch }}-pip-
285315
286316
- name: pip cache (Windows)
287-
uses: actions/cache@v4
317+
uses: actions/cache@v5
288318
if: ${{ startsWith(runner.os, 'Windows') }}
289319
with:
290320
path: ${{ steps.pip-cache-windows.outputs.dir }}
291-
key: ${{ runner.os }}-pip-${{ matrix.python-version }}
321+
key: ${{ runner.os }}-${{ runner.arch }}-pip-${{ matrix.python-version }}
292322
restore-keys: |
293-
${{ runner.os }}-pip-
294-
295-
- name: Download persistent wheel
296-
uses: actions/download-artifact@v4
323+
${{ runner.os }}-${{ runner.arch }}-pip-
324+
- name: Download persistent wheel (Linux/macOS)
325+
if: "!startsWith(runner.os, 'Windows')"
326+
uses: actions/download-artifact@v8
297327
with:
298328
name: persistent-${{ runner.os }}-${{ matrix.python-version }}.whl
299329
path: dist/
330+
331+
- name: Download persistent wheel (Windows)
332+
if: startsWith(runner.os, 'Windows')
333+
uses: actions/download-artifact@v8
334+
with:
335+
name: persistent-${{ runner.os }}-${{ matrix.python-version }}-${{ runner.arch }}.whl
336+
path: dist/
300337
- name: Install persistent
301338
run: |
302-
pip install -U wheel "setuptools >= 78.1.1,< 81"
339+
pip install -U wheel "setuptools >= 78.1.1,< 82"
303340
pip install -U coverage[toml]
304341
pip install -U 'cffi; platform_python_implementation == "CPython"'
305342
# Unzip into src/ so that testrunner can find the .so files
@@ -375,25 +412,24 @@ jobs:
375412
echo "dir=$(pip cache dir)" >> $Env:GITHUB_OUTPUT
376413
377414
- name: pip cache (default)
378-
uses: actions/cache@v4
415+
uses: actions/cache@v5
379416
if: ${{ !startsWith(runner.os, 'Windows') }}
380417
with:
381418
path: ${{ steps.pip-cache-default.outputs.dir }}
382-
key: ${{ runner.os }}-pip-${{ matrix.python-version }}
419+
key: ${{ runner.os }}-${{ runner.arch }}-pip-${{ matrix.python-version }}
383420
restore-keys: |
384-
${{ runner.os }}-pip-
421+
${{ runner.os }}-${{ runner.arch }}-pip-
385422
386423
- name: pip cache (Windows)
387-
uses: actions/cache@v4
424+
uses: actions/cache@v5
388425
if: ${{ startsWith(runner.os, 'Windows') }}
389426
with:
390427
path: ${{ steps.pip-cache-windows.outputs.dir }}
391-
key: ${{ runner.os }}-pip-${{ matrix.python-version }}
428+
key: ${{ runner.os }}-${{ runner.arch }}-pip-${{ matrix.python-version }}
392429
restore-keys: |
393-
${{ runner.os }}-pip-
394-
430+
${{ runner.os }}-${{ runner.arch }}-pip-
395431
- name: Download persistent wheel
396-
uses: actions/download-artifact@v4
432+
uses: actions/download-artifact@v8
397433
with:
398434
name: persistent-${{ runner.os }}-${{ matrix.python-version }}.whl
399435
path: dist/
@@ -446,25 +482,24 @@ jobs:
446482
echo "dir=$(pip cache dir)" >> $Env:GITHUB_OUTPUT
447483
448484
- name: pip cache (default)
449-
uses: actions/cache@v4
485+
uses: actions/cache@v5
450486
if: ${{ !startsWith(runner.os, 'Windows') }}
451487
with:
452488
path: ${{ steps.pip-cache-default.outputs.dir }}
453-
key: ${{ runner.os }}-pip-${{ matrix.python-version }}
489+
key: ${{ runner.os }}-${{ runner.arch }}-pip-${{ matrix.python-version }}
454490
restore-keys: |
455-
${{ runner.os }}-pip-
491+
${{ runner.os }}-${{ runner.arch }}-pip-
456492
457493
- name: pip cache (Windows)
458-
uses: actions/cache@v4
494+
uses: actions/cache@v5
459495
if: ${{ startsWith(runner.os, 'Windows') }}
460496
with:
461497
path: ${{ steps.pip-cache-windows.outputs.dir }}
462-
key: ${{ runner.os }}-pip-${{ matrix.python-version }}
498+
key: ${{ runner.os }}-${{ runner.arch }}-pip-${{ matrix.python-version }}
463499
restore-keys: |
464-
${{ runner.os }}-pip-
465-
500+
${{ runner.os }}-${{ runner.arch }}-pip-
466501
- name: Download persistent wheel
467-
uses: actions/download-artifact@v4
502+
uses: actions/download-artifact@v8
468503
with:
469504
name: persistent-${{ runner.os }}-${{ matrix.python-version }}.whl
470505
path: dist/
@@ -524,22 +559,22 @@ jobs:
524559
echo "dir=$(pip cache dir)" >> $Env:GITHUB_OUTPUT
525560
526561
- name: pip cache (default)
527-
uses: actions/cache@v4
562+
uses: actions/cache@v5
528563
if: ${{ !startsWith(runner.os, 'Windows') }}
529564
with:
530565
path: ${{ steps.pip-cache-default.outputs.dir }}
531566
key: ${{ runner.os }}-pip_manylinux-${{ matrix.image }}-${{ matrix.python-version }}
532567
restore-keys: |
533-
${{ runner.os }}-pip-
568+
${{ runner.os }}-${{ runner.arch }}-pip-
534569
535570
- name: pip cache (Windows)
536-
uses: actions/cache@v4
571+
uses: actions/cache@v5
537572
if: ${{ startsWith(runner.os, 'Windows') }}
538573
with:
539574
path: ${{ steps.pip-cache-windows.outputs.dir }}
540575
key: ${{ runner.os }}-pip_manylinux-${{ matrix.image }}-${{ matrix.python-version }}
541576
restore-keys: |
542-
${{ runner.os }}-pip-
577+
${{ runner.os }}-${{ runner.arch }}-pip-
543578
544579
- name: Update pip
545580
run: pip install -U pip
@@ -562,7 +597,7 @@ jobs:
562597
bash .manylinux.sh
563598
564599
- name: Upload persistent wheels
565-
uses: actions/upload-artifact@v4
600+
uses: actions/upload-artifact@v7
566601
with:
567602
path: wheelhouse/*whl
568603
name: manylinux_${{ matrix.image }}_wheels.zip
@@ -586,7 +621,7 @@ jobs:
586621

587622
steps:
588623
- name: Download all wheel artifacts
589-
uses: actions/download-artifact@v4
624+
uses: actions/download-artifact@v8
590625
with:
591626
path: dist/
592627
pattern: '*'

.meta.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# https://github.com/zopefoundation/meta/tree/master/src/zope/meta/c-code
33
[meta]
44
template = "c-code"
5-
commit-id = "2dc4f53b"
5+
commit-id = "f472bcc5"
66

77
[python]
88
with-windows = true

.pre-commit-config.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
minimum_pre_commit_version: '3.6'
44
repos:
55
- repo: https://github.com/pycqa/isort
6-
rev: "7.0.0"
6+
rev: "8.0.1"
77
hooks:
88
- id: isort
99
- repo: https://github.com/hhatto/autopep8
@@ -20,6 +20,7 @@ repos:
2020
rev: 0.4.3
2121
hooks:
2222
- id: teyit
23+
language_version: python3.13
2324
- repo: https://github.com/PyCQA/flake8
2425
rev: "7.3.0"
2526
hooks:

CHANGES.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ Change log
44
6.6 (unreleased)
55
----------------
66

7+
- Add support for automatically building and publishing Windows/ARM64 wheels.
8+
9+
- Add support for automatically building and publishing source distributions.
10+
711
- Fix compilation on free-threaded Python 3.14t: replace direct
812
``ob_refcnt``/``ob_type`` struct access with ``Py_REFCNT()``/``Py_TYPE()``
913
API macros, fix ``Py_BuildValue`` format strings for ``Py_ssize_t``.

tox.ini

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ envlist =
1717

1818
[testenv]
1919
deps =
20-
setuptools >= 78.1.1,< 81
20+
setuptools >= 78.1.1,< 82
2121
setenv =
2222
pure: PURE_PYTHON=1
2323
!pure-!pypy3: PURE_PYTHON=0
@@ -60,12 +60,12 @@ deps =
6060
twine
6161
build
6262
check-manifest
63-
check-python-versions >= 0.20.0
63+
check-python-versions >= 0.24.2
6464
wheel
6565
commands_pre =
6666
commands =
6767
check-manifest
68-
check-python-versions --only pyproject.toml,setup.py,tox.ini
68+
check-python-versions --only pyproject.toml,setup.py,tox.ini,.github/workflows/tests.yml
6969
python -m build --sdist --no-isolation
7070
twine check dist/*
7171

0 commit comments

Comments
 (0)