Skip to content

Commit c5d510d

Browse files
authored
Configuring for pure-python (#85)
1 parent 02c2f25 commit c5d510d

File tree

8 files changed

+43
-32
lines changed

8 files changed

+43
-32
lines changed

.github/workflows/pre-commit.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,22 @@ env:
1515

1616
jobs:
1717
pre-commit:
18+
permissions:
19+
contents: read
20+
pull-requests: write
1821
name: linting
1922
runs-on: ubuntu-latest
2023
steps:
2124
- uses: actions/checkout@v4
2225
- uses: actions/setup-python@v5
2326
with:
2427
python-version: 3.x
25-
- uses: pre-commit/[email protected]
28+
- uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd #v3.0.1
2629
with:
2730
extra_args: --all-files --show-diff-on-failure
2831
env:
2932
PRE_COMMIT_COLOR: always
30-
- uses: pre-commit-ci/lite-action@v1.0.2
33+
- uses: pre-commit-ci/lite-action@5d6cc0eb514c891a40562a58a8e71576c5c7fb43 #v1.1.0
3134
if: always()
3235
with:
3336
msg: Apply pre-commit code formatting

.github/workflows/tests.yml

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ on:
1212

1313
jobs:
1414
build:
15+
permissions:
16+
contents: read
17+
pull-requests: write
1518
strategy:
1619
# We want to see all failures:
1720
fail-fast: false
@@ -35,33 +38,26 @@ jobs:
3538
name: ${{ matrix.config[1] }}
3639
steps:
3740
- uses: actions/checkout@v4
38-
- name: Set up Python
39-
uses: actions/setup-python@v5
4041
with:
41-
python-version: ${{ matrix.config[0] }}
42-
allow-prereleases: true
43-
- name: Pip cache
44-
uses: actions/cache@v4
42+
persist-credentials: false
43+
- name: Install uv + caching
44+
uses: astral-sh/setup-uv@v6
4545
with:
46-
path: ~/.cache/pip
47-
key: ${{ runner.os }}-pip-${{ matrix.config[0] }}-${{ hashFiles('setup.*', 'tox.ini') }}
48-
restore-keys: |
49-
${{ runner.os }}-pip-${{ matrix.config[0] }}-
50-
${{ runner.os }}-pip-
51-
- name: Install dependencies
52-
run: |
53-
python -m pip install --upgrade pip
54-
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 }}
5552
- name: Test
5653
if: ${{ !startsWith(runner.os, 'Mac') }}
57-
run: tox -e ${{ matrix.config[1] }}
54+
run: uvx --with tox-uv tox -e ${{ matrix.config[1] }}
5855
- name: Test (macOS)
5956
if: ${{ startsWith(runner.os, 'Mac') }}
60-
run: tox -e ${{ matrix.config[1] }}-universal2
57+
run: uvx --with tox-uv tox -e ${{ matrix.config[1] }}-universal2
6158
- name: Coverage
6259
if: matrix.config[1] == 'coverage'
6360
run: |
64-
pip install coveralls
65-
coveralls --service=github
61+
uvx coveralls --service=github
6662
env:
6763
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 = "d1a00d25"
5+
commit-id = "d03bba5c"
66

77
[python]
88
with-pypy = true

.pre-commit-config.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@
33
minimum_pre_commit_version: '3.6'
44
repos:
55
- repo: https://github.com/pycqa/isort
6-
rev: "5.13.2"
6+
rev: "6.0.1"
77
hooks:
88
- id: isort
99
- repo: https://github.com/hhatto/autopep8
10-
rev: "v2.3.1"
10+
rev: "v2.3.2"
1111
hooks:
1212
- id: autopep8
1313
args: [--in-place, --aggressive, --aggressive]
1414
- repo: https://github.com/asottile/pyupgrade
15-
rev: v3.19.0
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:

CHANGES.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77

88
- Nothing changed yet.
99

10-
1110
7.3 (2025-03-05)
1211
================
1312

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!--
22
Generated from:
33
https://github.com/zopefoundation/meta/tree/master/config/pure-python
4-
-->
4+
-->
55
# Contributing to zopefoundation projects
66

77
The projects under the zopefoundation GitHub organization are open source and

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 = 90
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
setenv =
2424
ZOPE_INTERFACE_STRICT_IRO=1
2525
commands =
@@ -37,7 +37,8 @@ description = ensure that the distribution is ready to release
3737
basepython = python3
3838
skip_install = true
3939
deps =
40-
setuptools <= 75.6.0
40+
setuptools == 78.1.1
41+
wheel
4142
twine
4243
build
4344
check-manifest

0 commit comments

Comments
 (0)