Repository navigation
Commit 7a33c14
build(tox): don't install GitPython in the
The tox `ruff`, `format`, and `misc` environments only run tools on the
source tree: `ruff check`, `ruff format --check`, and the remaining
pre-commit hooks. But they did not set `skip_install`, so they inherited
the default of installing GitPython with `extras = test` from
`[testenv]`. That has always been unneeded work, but it became a real
obstacle when 212573b (gitpython-developers#2274) added GixPython to the `test` extra for
Python 3.11 and later. GixPython 0.3.0 publishes wheels only for macOS,
so on Linux and Windows installing it builds its source distribution,
which needs Rust 1.89 or newer and a linker. So on those platforms,
running Ruff through tox needed a Rust toolchain whenever 3.10 was not
found but 3.11 or 3.12 was, since tox then picked one of those for these
environments.
Set `skip_install = true` in all three environments. `ruff` and
`format` already list `ruff` in `deps`. `misc` got `pre-commit` from
the `test` extra, so list it in `deps` instead. Like the `test`
extra's entry, it is unversioned. The pre-commit hooks themselves are
installed by pre-commit into its own environments as before.
Run locally with tox 4.67.1, each environment now installs only
`ruff` or `pre-commit` and passes, with `misc` running every non-Ruff
hook. `ruff` and `format` each took about 1.5 seconds, compared with
about 12 seconds for `ruff` before, most of which went to installing
the `test` extra.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>ruff, format, misc envs1 parent 646119a commit 7a33c14
1 file changed
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
| |||
37 | 38 | | |
38 | 39 | | |
39 | 40 | | |
| 41 | + | |
40 | 42 | | |
41 | 43 | | |
42 | 44 | | |
| |||
63 | 65 | | |
64 | 66 | | |
65 | 67 | | |
| 68 | + | |
| 69 | + | |
66 | 70 | | |
67 | 71 | | |
68 | 72 | | |
0 commit comments