@@ -38,11 +38,16 @@ def run_pipe(cmd: str, cwd=None):
3838
3939def make_venv (project_path : Path ) -> callable :
4040 venv_path = project_path / ".venv"
41- run_pipe (f"uv venv { venv_path } " )
4241 run = functools .partial (run_pipe , cwd = str (project_path ))
43- # install to this env (hence the -p)
44- run (f"uv pip install -e .[dev] -p { venv_path } /bin/python" )
45- # run("ls -la .venv/bin >&2")
42+ run ("uv sync" ) # Create a lockfile and install packages
43+
44+ for exe_path in [
45+ venv_path / "bin" / "tox" ,
46+ venv_path / "bin" / "python" ,
47+ venv_path / "bin" / "uv" ,
48+ ]:
49+ assert exe_path .exists (), f"UV created a venv but did not install { exe_path } "
50+
4651 return run
4752
4853
@@ -60,8 +65,8 @@ def test_template_defaults(tmp_path: Path):
6065 # Only run linkcheck if not on a tag, as the CI might not have pushed
6166 # the docs for this tag yet, so we will fail
6267 run (".venv/bin/tox -p -e docs -- -b linkcheck" )
63- run (".venv/bin/uv pip install build twine" )
64- run (".venv/bin/python -m build" )
68+ run (".venv/bin/uv pip install twine" )
69+ run (".venv/bin/uv build" )
6570 run (".venv/bin/twine check --strict dist/*" )
6671
6772
0 commit comments