Skip to content

Commit 03ab654

Browse files
authored
Configuring for pure-python (#15)
1 parent 9696001 commit 03ab654

5 files changed

Lines changed: 32 additions & 28 deletions

File tree

.github/workflows/tests.yml

Lines changed: 11 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -40,33 +40,24 @@ jobs:
4040
- uses: actions/checkout@v4
4141
with:
4242
persist-credentials: false
43-
- name: Set up Python
44-
uses: actions/setup-python@v5
43+
- name: Install uv + caching
44+
uses: astral-sh/setup-uv@v6
4545
with:
46-
python-version: ${{ matrix.config[0] }}
47-
allow-prereleases: true
48-
- name: Pip cache
49-
uses: actions/cache@v4
50-
with:
51-
path: ~/.cache/pip
52-
key: ${{ runner.os }}-pip-${{ matrix.config[0] }}-${{ hashFiles('setup.*', 'tox.ini') }}
53-
restore-keys: |
54-
${{ runner.os }}-pip-${{ matrix.config[0] }}-
55-
${{ runner.os }}-pip-
56-
- name: Install dependencies
57-
run: |
58-
python -m pip install --upgrade pip
59-
pip install tox
46+
enable-cache: true
47+
cache-dependency-glob: |
48+
setup.*
49+
tox.ini
50+
python-version: ${{ matrix.matrix.config[0] }}
51+
github-token: ${{ secrets.GITHUB_TOKEN }}
6052
- name: Test
6153
if: ${{ !startsWith(runner.os, 'Mac') }}
62-
run: tox -e ${{ matrix.config[1] }}
54+
run: uvx --with tox-uv tox -e ${{ matrix.config[1] }}
6355
- name: Test (macOS)
6456
if: ${{ startsWith(runner.os, 'Mac') }}
65-
run: tox -e ${{ matrix.config[1] }}-universal2
57+
run: uvx --with tox-uv tox -e ${{ matrix.config[1] }}-universal2
6658
- name: Coverage
6759
if: matrix.config[1] == 'coverage'
6860
run: |
69-
pip install coveralls
70-
coveralls --service=github
61+
uvx coveralls --service=github
7162
env:
7263
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.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/config/pure-python
33
[meta]
44
template = "pure-python"
5-
commit-id = "18bd2267"
5+
commit-id = "d03bba5c"
66

77
[python]
88
with-windows = false

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
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: "6.0.0"
6+
rev: "6.0.1"
77
hooks:
88
- id: isort
99
- repo: https://github.com/hhatto/autopep8
@@ -12,7 +12,7 @@ repos:
1212
- id: autopep8
1313
args: [--in-place, --aggressive, --aggressive]
1414
- repo: https://github.com/asottile/pyupgrade
15-
rev: v3.19.1
15+
rev: v3.20.0
1616
hooks:
1717
- id: pyupgrade
1818
args: [--py39-plus]
@@ -21,7 +21,7 @@ repos:
2121
hooks:
2222
- id: teyit
2323
- repo: https://github.com/PyCQA/flake8
24-
rev: "7.1.1"
24+
rev: "7.3.0"
2525
hooks:
2626
- id: flake8
2727
additional_dependencies:

pyproject.toml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@
33
# https://github.com/zopefoundation/meta/tree/master/config/pure-python
44

55
[build-system]
6-
requires = ["setuptools <= 75.6.0"]
6+
requires = [
7+
"setuptools == 78.1.1",
8+
"wheel",
9+
]
710
build-backend = "setuptools.build_meta"
811

912
[tool.coverage.run]
@@ -15,7 +18,16 @@ fail_under = 99
1518
precision = 2
1619
ignore_errors = true
1720
show_missing = true
18-
exclude_lines = ["pragma: no cover", "pragma: nocover", "except ImportError:", "raise NotImplementedError", "if __name__ == '__main__':", "self.fail", "raise AssertionError", "raise unittest.Skip"]
21+
exclude_lines = [
22+
"pragma: no cover",
23+
"pragma: nocover",
24+
"except ImportError:",
25+
"raise NotImplementedError",
26+
"if __name__ == '__main__':",
27+
"self.fail",
28+
"raise AssertionError",
29+
"raise unittest.Skip",
30+
]
1931

2032
[tool.coverage.html]
2133
directory = "parts/htmlcov"

tox.ini

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ usedevelop = true
1919
package = wheel
2020
wheel_build_env = .pkg
2121
deps =
22-
setuptools <= 75.6.0
22+
setuptools == 78.1.1
2323
commands =
2424
zope-testrunner --test-path=src {posargs:-vc}
2525
extras =
@@ -35,7 +35,8 @@ description = ensure that the distribution is ready to release
3535
basepython = python3
3636
skip_install = true
3737
deps =
38-
setuptools <= 75.6.0
38+
setuptools == 78.1.1
39+
wheel
3940
twine
4041
build
4142
check-manifest

0 commit comments

Comments
 (0)