Skip to content

Commit caeb7bf

Browse files
Update from Copier (2026-09-13T16-06-03Z) (#2)
Signed-off-by: python-templates-copier-update[bot] <python-templates-copier-update[bot]@users.noreply.github.com> Co-authored-by: python-templates-copier-update[bot] <python-templates-copier-update[bot]@users.noreply.github.com>
1 parent 8d241c7 commit caeb7bf

7 files changed

Lines changed: 67 additions & 100 deletions

File tree

‎.copier-answers.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Changes here will be overwritten by Copier
2-
_commit: 6a0f1bb
2+
_commit: f43b419
33
_src_path: https://github.com/python-project-templates/base.git
44
add_docs: true
55
add_extension: cython

‎.github/scripts/test-distributions.py‎

Lines changed: 0 additions & 65 deletions
This file was deleted.

‎.github/workflows/build.yaml‎

Lines changed: 49 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ jobs:
3131
fail-fast: false
3232
matrix:
3333
platform:
34-
- ubuntu-latest
34+
- ubuntu-24.04
3535
- ubuntu-24.04-arm
36-
- macos-latest
37-
- windows-latest
36+
- macos-26
37+
- windows-2025
3838
python:
3939
- version: "3.11"
4040
cibuildwheel: "cp311"
@@ -70,11 +70,11 @@ jobs:
7070

7171
- name: Lint
7272
run: make lint
73-
if: matrix.platform == 'ubuntu-latest' && matrix.python.primary
73+
if: matrix.platform == 'ubuntu-24.04' && matrix.python.primary
7474

7575
- name: Checks
7676
run: make checks
77-
if: matrix.platform == 'ubuntu-latest' && matrix.python.primary
77+
if: matrix.platform == 'ubuntu-24.04' && matrix.python.primary
7878

7979
- name: Test
8080
run: make coverage
@@ -90,23 +90,61 @@ jobs:
9090
uses: EnricoMi/publish-unit-test-result-action@d0a4676d0e0b938bc201470d88276b7c74c712b3 # v2.24.0
9191
with:
9292
files: '**/junit.xml'
93-
if: matrix.platform == 'ubuntu-latest' && matrix.python.primary && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository)
93+
if: matrix.platform == 'ubuntu-24.04' && matrix.python.primary && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository)
9494

9595
- name: Upload coverage
9696
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
9797
with:
9898
token: ${{ secrets.CODECOV_TOKEN }}
9999

100-
- name: Build distributions
100+
- name: Build distributions (Linux x86_64)
101101
run: |
102-
make clean
102+
rm -rf dist
103+
make dist-py-sdist
103104
make dist-py-wheel
104105
make dist-check
105106
env:
106-
CIBW_BUILD: "${{ matrix.python.cibuildwheel }}-*"
107+
CIBW_BUILD: "${{ matrix.python.cibuildwheel }}-manylinux*"
108+
if: matrix.platform == 'ubuntu-24.04'
107109

108-
- name: Test distributions
109-
run: make test-dist
110+
- name: Build distributions (Linux ARM64)
111+
run: |
112+
rm -rf dist
113+
make dist-py-wheel
114+
make dist-check
115+
env:
116+
CIBW_BUILD: "${{ matrix.python.cibuildwheel }}-manylinux*"
117+
if: matrix.platform == 'ubuntu-24.04-arm'
118+
119+
- name: Build distributions (macOS)
120+
run: |
121+
rm -rf dist
122+
make dist-py-wheel
123+
make dist-check
124+
env:
125+
CIBW_BUILD: "${{ matrix.python.cibuildwheel }}-macos*"
126+
if: matrix.platform == 'macos-26'
127+
128+
- name: Build distributions (Windows)
129+
run: |
130+
if (Test-Path dist) { Remove-Item dist -Recurse -Force }
131+
make dist-py-wheel
132+
make dist-check
133+
env:
134+
CIBW_BUILD: "${{ matrix.python.cibuildwheel }}-win_amd64"
135+
if: matrix.platform == 'windows-2025'
136+
137+
- name: Test wheel
138+
uses: actions-ext/python/test-wheel@ec67f82b3bd863948308a41ecb9e70547cbb19c7
139+
with:
140+
module: python_template_cython
141+
if: runner.os == 'Linux'
142+
143+
- name: Test source distribution
144+
uses: actions-ext/python/test-sdist@ec67f82b3bd863948308a41ecb9e70547cbb19c7
145+
with:
146+
module: python_template_cython
147+
if: matrix.platform == 'ubuntu-24.04'
110148

111149
- name: Upload distributions
112150
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1

‎.github/workflows/docs.yaml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ permissions:
1313

1414
jobs:
1515
docs:
16-
runs-on: ubuntu-latest
16+
runs-on: ubuntu-24.04
1717
if: github.event.workflow_run.conclusion == 'success' || github.event_name == 'workflow_dispatch'
1818
steps:
1919
- name: Checkout
@@ -27,7 +27,7 @@ jobs:
2727
- name: Download distributions
2828
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
2929
with:
30-
pattern: dist-ubuntu-latest-3.11
30+
pattern: dist-ubuntu-24.04-3.11
3131
merge-multiple: true
3232
path: dist
3333
run-id: ${{ github.event.workflow_run.id }}

‎Makefile‎

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.DEFAULT_GOAL := help
2-
.PHONY: develop requirements build install lint-py lint-docs lint lints fix-py fix-docs fix format check-dist check-types checks check test tests coverage show-version patch minor major dist dist-build dist-py-wheel dist-py-sdist dist-check test-dist publish deep-clean clean help
2+
.PHONY: develop requirements build install lint-py lint-docs lint lints fix-py fix-docs fix format check-dist check-types checks check test tests coverage show-version patch minor major dist dist-build dist-py-wheel dist-py-sdist dist-check publish deep-clean clean help
33

44
develop: ## install dependencies and build library
55
uv pip install -e '.[develop]'
@@ -14,16 +14,16 @@ install: ## install library
1414
uv pip install .
1515

1616
lint-py: ## lint Python with ruff
17-
python -m ruff check python_template_cython .github/scripts
18-
python -m ruff format --check python_template_cython .github/scripts
17+
python -m ruff check python_template_cython
18+
python -m ruff format --check python_template_cython
1919

2020
lint-docs: ## lint documentation
2121
python -m mdformat --check README.md docs/development.md
2222
python -m codespell_lib README.md docs/development.md
2323

2424
fix-py: ## autoformat Python code
25-
python -m ruff check --fix python_template_cython .github/scripts
26-
python -m ruff format python_template_cython .github/scripts
25+
python -m ruff check --fix python_template_cython
26+
python -m ruff format python_template_cython
2727

2828
fix-docs: ## autoformat documentation
2929
python -m mdformat README.md docs/development.md
@@ -34,8 +34,8 @@ lints: lint
3434
fix: fix-py fix-docs ## run all autoformatters
3535
format: fix
3636

37-
check-dist: ## check sdist and wheel contents
38-
check-dist -v --rebuild
37+
check-dist: ## check python sdist and wheel with check-dist
38+
check-dist -v
3939

4040
check-types: ## check Python types (advisory)
4141
ty check python_template_cython
@@ -66,18 +66,15 @@ major: ## bump a major version
6666
dist-build: ## build local Python distributions
6767
python -m build -w -s
6868

69-
dist-py-wheel: dist-py-sdist ## build portable native wheels from the sdist
70-
python -m cibuildwheel --output-dir dist dist/*.tar.gz
69+
dist-py-wheel: ## build python wheel
70+
python -m cibuildwheel --output-dir dist
7171

72-
dist-py-sdist: ## build a source distribution
73-
python -m build --sdist --outdir dist
72+
dist-py-sdist: ## build python sdist
73+
python -m build --sdist -o dist
7474

75-
dist-check: ## check distribution metadata
75+
dist-check: ## run python dist checker with twine
7676
python -m twine check dist/*
7777

78-
test-dist: ## test installed wheels and rebuild source distributions
79-
python .github/scripts/test-distributions.py
80-
8178
dist: ## build and check local distributions
8279
$(MAKE) clean
8380
$(MAKE) dist-build

‎docs/development.md‎

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,9 @@ make lint
1111
make checks
1212
make coverage
1313
make dist
14-
make test-dist
1514
```
1615

17-
On Windows, activate with `.venv\Scripts\activate` instead. `make test-dist` installs
18-
compatible wheels in fresh environments and verifies compiled imports outside the
19-
checkout. It also rebuilds each sdist into a wheel and repeats those checks.
16+
On Windows, activate with `.venv\Scripts\activate` instead.
2017

2118
To compile another `.py` or `.pyx` module, add its path to
2219
`[tool.hatch.build.targets.wheel.hooks.cython.options.files].targets` in
@@ -29,7 +26,8 @@ is excluded because builds do not enable Cython line tracing.
2926

3027
For portable wheels, run `make dist-py-wheel` on the target platform. Linux wheel
3128
builds require Docker. Run `make dist-py-sdist` to build an sdist without compiling
32-
extensions. CI runs tests against each installed wheel through cibuildwheel.
29+
extensions. CI runs tests against each installed wheel through cibuildwheel, then
30+
installs the built wheel and sdist in fresh environments to verify they import.
3331

3432
To update the template from a clean branch:
3533

‎pyproject.toml‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ develop = [
4444
"hatchling",
4545
"mdformat",
4646
"mdformat-tables>=1",
47-
"packaging",
4847
"pytest",
4948
"pytest-cov",
5049
"ruff",

0 commit comments

Comments
 (0)