install_extras

This commit is contained in:
2026-03-05 10:01:26 -08:00
parent 5446fbb950
commit 99e70f8543
5 changed files with 76 additions and 54 deletions

View File

@@ -86,8 +86,13 @@ def run_sync(args: argparse.Namespace) -> int:
continue
if (source_dir / "pyproject.toml").exists():
print(f"\nInstalling {name}...")
prog = config.programs.get(svc.component or "") if svc.component else None
extras = prog.install_extras if prog else []
pkg_spec = str(source_dir)
if extras:
pkg_spec += "[" + ",".join(extras) + "]"
result = subprocess.run(
[uv_path, "tool", "install", "--editable", str(source_dir), "--force"],
[uv_path, "tool", "install", "--editable", pkg_spec, "--force"],
capture_output=True,
text=True,
)
@@ -122,8 +127,12 @@ def _try_install(
if (source_dir / "pyproject.toml").exists():
print(f"\nInstalling {name}...")
extras = getattr(comp, "install_extras", [])
pkg_spec = str(source_dir)
if extras:
pkg_spec += "[" + ",".join(extras) + "]"
result = subprocess.run(
[uv_path, "tool", "install", "--editable", str(source_dir), "--force"],
[uv_path, "tool", "install", "--editable", pkg_spec, "--force"],
capture_output=True,
text=True,
)