@@ -147,7 +147,7 @@ def build(options: Options, tmp_path: Path) -> None:
147
147
built_wheel = build_wheel (state )
148
148
repaired_wheel = repair_wheel (state , built_wheel )
149
149
150
- test_wheel (state , repaired_wheel )
150
+ test_wheel (state , repaired_wheel , build_frontend = build_options . build_frontend . name )
151
151
152
152
output_wheel : Path | None = None
153
153
if compatible_wheel is None :
@@ -565,12 +565,19 @@ def soname_with_hash(src_path: Path) -> str:
565
565
return src_name
566
566
567
567
568
- def test_wheel (state : BuildState , wheel : Path ) -> None :
568
+ def test_wheel (state : BuildState , wheel : Path , * , build_frontend : str ) -> None :
569
569
test_command = state .options .test_command
570
570
if not (test_command and state .options .test_selector (state .config .identifier )):
571
571
return
572
572
573
573
log .step ("Testing wheel..." )
574
+ use_uv = build_frontend == "build[uv]"
575
+ uv_path = find_uv ()
576
+ if use_uv and uv_path is None :
577
+ msg = "uv not found"
578
+ raise AssertionError (msg )
579
+ pip = ["pip" ] if not use_uv else [str (uv_path ), "pip" ]
580
+
574
581
native_arch = arch_synonym (platform .machine (), platforms .native_platform (), "android" )
575
582
if state .config .arch != native_arch :
576
583
log .warning (
@@ -590,7 +597,7 @@ def test_wheel(state: BuildState, wheel: Path) -> None:
590
597
site_packages_dir = state .build_path / "site-packages"
591
598
site_packages_dir .mkdir ()
592
599
call (
593
- " pip" ,
600
+ * pip ,
594
601
"install" ,
595
602
"--only-binary=:all:" ,
596
603
"--platform" ,
0 commit comments