From fe4b2b9eb7fb8aac81f65630720c9079d0a3121a Mon Sep 17 00:00:00 2001 From: historia Date: Mon, 24 Aug 2026 23:49:34 -0400 Subject: feat: user-friendly menu gating, clearer install/configure path for backends --- app/backends/envs.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'app/backends/envs.py') diff --git a/app/backends/envs.py b/app/backends/envs.py index 5a51a33..7b3c54b 100644 --- a/app/backends/envs.py +++ b/app/backends/envs.py @@ -94,17 +94,23 @@ def install_requirements() -> int: [str(env_python()), "-m", "pip", "install", "-r", str(REQUIREMENTS_PATH)]) -def pip_install(packages: List[str]) -> int: +def pip_install(packages: List[str], *, emit=None, cancel=None) -> int: """pip install PACKAGES into the venv, creating it first if needed. Used by the qwen/faster setup wizards to install backend TTS packages - alongside the app requirements. Returns pip's exit code. + alongside the app requirements. Returns pip's exit code. With EMIT given + (the in-TUI task view) pip runs with ``--progress-bar off`` so its output + is clean status lines rather than carriage-return progress spam. """ if not env_exists() and create_env() != 0: return 1 print(f"[INFO] pip install {' '.join(packages)} into {ENV_DIR}...") - return common.run_console_subprocess( - [str(env_python()), "-m", "pip", "install", *packages]) + argv = [str(env_python()), "-m", "pip", "install"] + if emit is not None: + argv.append("--progress-bar") + argv.append("off") + argv.extend(packages) + return common.run_console_subprocess(argv, emit=emit, cancel=cancel) def pip_uninstall(packages: List[str]) -> int: -- cgit v1.2.3