@@ -223,7 +223,7 @@ def setup_python(
223223 dependency_constraint_flags : Sequence [PathOrStr ],
224224 environment : ParsedEnvironment ,
225225 build_frontend : BuildFrontendName ,
226- ) -> dict [str , str ]:
226+ ) -> tuple [ Path , dict [str , str ] ]:
227227 tmp .mkdir ()
228228 implementation_id = python_configuration .identifier .split ("-" )[0 ]
229229 python_libs_base = None
@@ -330,7 +330,7 @@ def setup_python(
330330 setup_setuptools_cross_compile (tmp , python_configuration , python_libs_base , env )
331331 setup_rust_cross_compile (tmp , python_configuration , python_libs_base , env )
332332
333- return env
333+ return base_python , env
334334
335335
336336def build (options : Options , tmp_path : Path ) -> None :
@@ -376,7 +376,7 @@ def build(options: Options, tmp_path: Path) -> None:
376376 ]
377377
378378 # install Python
379- env = setup_python (
379+ base_python , env = setup_python (
380380 identifier_tmp_dir / "build" ,
381381 config ,
382382 dependency_constraint_flags ,
@@ -502,7 +502,7 @@ def build(options: Options, tmp_path: Path) -> None:
502502 venv_dir = identifier_tmp_dir / "venv-test"
503503
504504 if use_uv :
505- call ("uv" , "venv" , venv_dir , "--python=python " , env = env )
505+ call ("uv" , "venv" , venv_dir , f "--python={ base_python } " , env = env )
506506 else :
507507 # Use pip version from the initial env to ensure determinism
508508 venv_args = ["--no-periodic-update" , f"--pip={ pip_version } " ]
0 commit comments