Fix build script: remove duplicate 'install' arg, fix Windows shell
Some checks failed
Build & Release / Build sidecar (x86_64-pc-windows-msvc) (push) Failing after 5s
Build & Release / Build app (x86_64-unknown-linux-gnu) (push) Has been cancelled
Build & Release / Build app (aarch64-apple-darwin) (push) Has been cancelled
Build & Release / Build app (x86_64-pc-windows-msvc) (push) Has been cancelled
Build & Release / Create Release (push) Has been cancelled
Build & Release / Build sidecar (x86_64-unknown-linux-gnu) (push) Has been cancelled
Build & Release / Build sidecar (aarch64-apple-darwin) (push) Has been cancelled

- build_sidecar.py: pip_install() now includes 'install' in the command,
  callers pass only package names (was doubling up as 'uv pip install install torch')
- CI: set shell: bash on uv steps so Windows doesn't try to use cmd.exe

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Claude
2026-03-20 23:03:23 -07:00
parent 9cec3c3858
commit 760b5dc90e
2 changed files with 10 additions and 7 deletions

View File

@@ -96,30 +96,31 @@ def create_venv_and_install(cpu_only: bool) -> Path:
else:
python = str(venv_dir / "bin" / "python")
def pkg_install(*args: str) -> None:
def pip_install(*args: str) -> None:
"""Install packages. Pass package names and flags only, not 'install'."""
if use_uv:
subprocess.run(["uv", "pip", "install", "--python", python, *args], check=True)
else:
subprocess.run([python, "-m", "pip", *args], check=True)
subprocess.run([python, "-m", "pip", "install", *args], check=True)
if not use_uv:
# Upgrade pip (uv doesn't need this)
pkg_install("install", "--upgrade", "pip", "setuptools", "wheel")
pip_install("--upgrade", "pip", "setuptools", "wheel")
# Install torch (CPU-only to avoid bundling ~2GB of CUDA libs)
if cpu_only:
print("[build] Installing PyTorch (CPU-only)")
pkg_install(
"install", "torch", "torchaudio",
pip_install(
"torch", "torchaudio",
"--index-url", "https://download.pytorch.org/whl/cpu",
)
else:
print("[build] Installing PyTorch (default, may include CUDA)")
pkg_install("install", "torch", "torchaudio")
pip_install("torch", "torchaudio")
# Install project and dev deps (includes pyinstaller)
print("[build] Installing project dependencies")
pkg_install("install", "-e", f"{SCRIPT_DIR}[dev]")
pip_install("-e", f"{SCRIPT_DIR}[dev]")
return Path(python)