Skip to content
Snippets Groups Projects
Unverified Commit 771a3581 authored by Antoine R. Dumont's avatar Antoine R. Dumont
Browse files

app_manager: Use more efficient uv cli instead of pip

It's more efficient and faster for computing the requirements (twice as fast).
parent 2ad46dc1
1 merge request!46app_manager: Use more efficient uv cli instead of pip
......@@ -71,11 +71,25 @@ class AppEnvBuilder(EnvBuilder):
self.context = context
self.run_bootstrap_deps()
self.run_pip("install", "--upgrade", "pip", "setuptools", "wheel")
def run_bootstrap_deps(self, *args, capture_output=False):
"""Install the necessary dependencies to run pip/uv."""
return self.run_command(
[self.context.env_exe, "-m", "pip", "install", "uv"],
capture_output=capture_output,
)
def run_pip(self, *args, capture_output=False):
cmd = [self.context.env_exe, "-m", "pip", *args]
"""Execute pip command through the uv cli."""
return self.run_command(
[self.context.env_exe, "-m", "uv", "pip", *args],
capture_output=capture_output,
)
def run_command(self, cmd: List[str], capture_output=False):
"""Actually execute the cmd."""
return subprocess.run(cmd, capture_output=capture_output, check=True)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment