Merge branch 'main' into pip

This commit is contained in:
Daniel Han 2026-03-25 09:38:41 -07:00
commit ec47b2984d
2 changed files with 9 additions and 7 deletions

View file

@ -66,8 +66,7 @@ def _pip_install_backend_deps() -> None:
except ImportError:
print("Upgrading huggingface-hub (is_offline_mode missing) ...")
subprocess.check_call(
[sys.executable, "-m", "pip", "install", "-q",
"huggingface-hub>=1.0"],
[sys.executable, "-m", "pip", "install", "-q", "huggingface-hub>=1.0"],
)

View file

@ -376,11 +376,14 @@ def install_python_stack() -> int:
# pip may not exist yet (uv-created venvs omit it). Try ensurepip
# first, then upgrade. Only fall back to a direct upgrade when pip
# is already present.
_has_pip = subprocess.run(
[sys.executable, "-m", "pip", "--version"],
stdout = subprocess.DEVNULL,
stderr = subprocess.DEVNULL,
).returncode == 0
_has_pip = (
subprocess.run(
[sys.executable, "-m", "pip", "--version"],
stdout = subprocess.DEVNULL,
stderr = subprocess.DEVNULL,
).returncode
== 0
)
if not _has_pip:
run(