Skip to content

Commit 4e5b065

Browse files
EliahKaganclaude
andcommitted
build(tox): install the in-tree smmap and gitdb
Since 8a08afa (gitpython-developers#2179), `smmap` and `gitdb` are developed in this repository, and CI installs them from there, together with GitPython, with `pip install ./smmap ./gitdb ".[${EXTRAS}]"`. tox did not follow: its environments install GitPython's wheel, and pip fetches `gitdb` and `smmap` from PyPI to satisfy its `gitdb>=4.0.1,<5` requirement. So `tox` could test GitPython against different `gitdb` and `smmap` code than CI does, for example after a change to them that has not been released yet. Add the two directories to `deps` in `[tool.tox.env_run_base]`, as `{tox_root}/smmap` and `{tox_root}/gitdb`. tox installs `deps` before the package's own dependencies, which they then satisfy, so pip keeps them. Every environment that installs GitPython inherits this. `ruff`, `format`, and `misc` set their own `deps` and skip installing GitPython, so they are unaffected. As with other `deps`, tox does not notice changes inside those directories, so an existing environment needs `tox -r` to pick up edits to `smmap` or `gitdb`. Checked with tox 4.22.0 and 4.67.1. `tox config` shows the two paths in the `deps` of `py39`, `py313`, `mypy`, `html`, and `gix`, and not `ruff`. The `py39` smoke check and `html` passed, and `tox -e py313 -- --collect-only -q test/test_util.py` collected the tests. In each of those environments, `smmap` 5.0.3 and `gitdb` 4.0.12 came from the local directories, per their `direct_url.json`. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 2904870 commit 4e5b065

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎pyproject.toml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,8 @@ env_list = [
179179
[tool.tox.env_run_base]
180180
description = "Run unit tests"
181181
package = "wheel"
182+
# Use the in-tree smmap and gitdb, as CI does, rather than releases from PyPI.
183+
deps = ["{tox_root}/smmap", "{tox_root}/gitdb"]
182184
extras = ["test"]
183185
pass_env = [
184186
"SSH_*",

0 commit comments

Comments
 (0)