From c54e0c2aa7cf2a220c8f29ab55dc82e964bb8f75 Mon Sep 17 00:00:00 2001 From: Jonathan Swoboda <154711427+swoboda1337@users.noreply.github.com> Date: Wed, 11 Feb 2026 09:07:13 -0500 Subject: [PATCH 1/2] Fall back to pip when external uv fails to install uv into penv When external uv is available but fails to install uv into the penv (e.g. due to transient network errors), fall through to the pip installation path instead of returning False and aborting the build. Co-Authored-By: Claude Opus 4.6 --- builder/penv_setup.py | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/builder/penv_setup.py b/builder/penv_setup.py index 98a7088cc..bdd9e36ec 100644 --- a/builder/penv_setup.py +++ b/builder/penv_setup.py @@ -250,7 +250,7 @@ def install_python_deps(python_exe, external_uv_executable): # Install uv into penv if not available if not uv_in_penv_available: if external_uv_executable: - # Use external uv to install uv into the penv + # Try external uv first to install uv into the penv try: subprocess.check_call( [external_uv_executable, "pip", "install", "uv>=0.1.0", f"--python={python_exe}", "--quiet"], @@ -258,20 +258,12 @@ def install_python_deps(python_exe, external_uv_executable): stderr=subprocess.STDOUT, timeout=300 ) - except subprocess.CalledProcessError as e: - print(f"Error: uv installation failed with exit code {e.returncode}") - return False - except subprocess.TimeoutExpired: - print("Error: uv installation timed out") - return False - except FileNotFoundError: - print("Error: External uv executable not found") - return False - except Exception as e: - print(f"Error installing uv package manager into penv: {e}") - return False - else: - # No external uv available, use pip to install uv into penv + uv_in_penv_available = True + except Exception: + pass + + if not uv_in_penv_available: + # Fallback to pip to install uv into penv try: subprocess.check_call( [python_exe, "-m", "pip", "install", "uv>=0.1.0", "--quiet"], From 72b4d3e6c3099289b99dd6f5a7d391a0b1541dc3 Mon Sep 17 00:00:00 2001 From: Jason2866 <24528715+Jason2866@users.noreply.github.com> Date: Wed, 11 Feb 2026 15:27:18 +0100 Subject: [PATCH 2/2] Log warning for failed external uv installation Added a warning message for failed external uv installation. --- builder/penv_setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builder/penv_setup.py b/builder/penv_setup.py index bdd9e36ec..26fc371f3 100644 --- a/builder/penv_setup.py +++ b/builder/penv_setup.py @@ -260,7 +260,7 @@ def install_python_deps(python_exe, external_uv_executable): ) uv_in_penv_available = True except Exception: - pass + print("Warning: uv installation via external uv failed, falling back to pip") if not uv_in_penv_available: # Fallback to pip to install uv into penv