@@ -199,7 +199,7 @@ def setup_python(
199199 build_frontend : BuildFrontendName ,
200200) -> tuple [Path , dict [str , str ]]:
201201 uv_path = find_uv ()
202- use_uv = build_frontend == "build[uv]"
202+ use_uv = build_frontend in { "build[uv]" , "uv" }
203203
204204 tmp .mkdir ()
205205 implementation_id = python_configuration .identifier .split ("-" )[0 ]
@@ -375,6 +375,17 @@ def setup_python(
375375 * constraint_flags (dependency_constraint ),
376376 env = env ,
377377 )
378+ elif build_frontend == "uv" :
379+ assert uv_path is not None
380+ call (
381+ uv_path ,
382+ "pip" ,
383+ "install" ,
384+ "--upgrade" ,
385+ "delocate" ,
386+ * dependency_constraint_flags ,
387+ env = env ,
388+ )
378389 else :
379390 assert_never (build_frontend )
380391
@@ -407,7 +418,7 @@ def build(options: Options, tmp_path: Path) -> None:
407418 for config in python_configurations :
408419 build_options = options .build_options (config .identifier )
409420 build_frontend = build_options .build_frontend or BuildFrontendConfig ("build" )
410- use_uv = build_frontend .name == "build[uv]"
421+ use_uv = build_frontend .name in { "build[uv]" , "uv" }
411422 uv_path = find_uv ()
412423 if use_uv and uv_path is None :
413424 msg = "uv not found"
@@ -494,6 +505,16 @@ def build(options: Options, tmp_path: Path) -> None:
494505 * extra_flags ,
495506 env = build_env ,
496507 )
508+ elif build_frontend .name == "uv" :
509+ call (
510+ "uv" ,
511+ "build" ,
512+ build_options .package_dir ,
513+ "--wheel" ,
514+ f"--out-dir={ built_wheel_dir } " ,
515+ * extra_flags ,
516+ env = build_env ,
517+ )
497518 else :
498519 assert_never (build_frontend )
499520
0 commit comments