Skip to content

Commit 0d2547b

Browse files
authored
fix: consistently use find_uv for our usage of uv (#2730)
Signed-off-by: Henry Schreiner <henryfs@princeton.edu>
1 parent 1252e62 commit 0d2547b

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

cibuildwheel/platforms/windows.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import shutil
66
import subprocess
77
import textwrap
8-
from collections.abc import MutableMapping, Set
8+
from collections.abc import MutableMapping, Sequence, Set
99
from functools import cache
1010
from pathlib import Path
1111
from typing import assert_never
@@ -588,7 +588,12 @@ def build(options: Options, tmp_path: Path) -> None:
588588
)
589589
shell(before_test_prepared, env=virtualenv_env)
590590

591-
pip = ["uv", "pip"] if use_uv else ["pip"]
591+
pip: Sequence[Path | str]
592+
if use_uv:
593+
assert uv_path is not None
594+
pip = [uv_path, "pip"]
595+
else:
596+
pip = ["pip"]
592597

593598
# install the wheel
594599
call(

cibuildwheel/venv.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,9 @@ def virtualenv(
108108
assert python.exists()
109109

110110
if use_uv:
111-
call("uv", "venv", venv_path, "--python", python)
111+
uv_path = find_uv()
112+
assert uv_path is not None
113+
call(uv_path, "venv", venv_path, "--python", python)
112114
else:
113115
virtualenv_app, virtualenv_version = _ensure_virtualenv(version)
114116
if pip_version is None:

0 commit comments

Comments
 (0)