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
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:
@@ -55,9 +55,11 @@ jobs:
|
|||||||
}
|
}
|
||||||
|
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
|
shell: bash
|
||||||
run: uv python install ${{ env.PYTHON_VERSION }}
|
run: uv python install ${{ env.PYTHON_VERSION }}
|
||||||
|
|
||||||
- name: Build sidecar
|
- name: Build sidecar
|
||||||
|
shell: bash
|
||||||
working-directory: python
|
working-directory: python
|
||||||
run: uv run --python ${{ env.PYTHON_VERSION }} python build_sidecar.py --cpu-only
|
run: uv run --python ${{ env.PYTHON_VERSION }} python build_sidecar.py --cpu-only
|
||||||
|
|
||||||
|
|||||||
@@ -96,30 +96,31 @@ def create_venv_and_install(cpu_only: bool) -> Path:
|
|||||||
else:
|
else:
|
||||||
python = str(venv_dir / "bin" / "python")
|
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:
|
if use_uv:
|
||||||
subprocess.run(["uv", "pip", "install", "--python", python, *args], check=True)
|
subprocess.run(["uv", "pip", "install", "--python", python, *args], check=True)
|
||||||
else:
|
else:
|
||||||
subprocess.run([python, "-m", "pip", *args], check=True)
|
subprocess.run([python, "-m", "pip", "install", *args], check=True)
|
||||||
|
|
||||||
if not use_uv:
|
if not use_uv:
|
||||||
# Upgrade pip (uv doesn't need this)
|
# 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)
|
# Install torch (CPU-only to avoid bundling ~2GB of CUDA libs)
|
||||||
if cpu_only:
|
if cpu_only:
|
||||||
print("[build] Installing PyTorch (CPU-only)")
|
print("[build] Installing PyTorch (CPU-only)")
|
||||||
pkg_install(
|
pip_install(
|
||||||
"install", "torch", "torchaudio",
|
"torch", "torchaudio",
|
||||||
"--index-url", "https://download.pytorch.org/whl/cpu",
|
"--index-url", "https://download.pytorch.org/whl/cpu",
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
print("[build] Installing PyTorch (default, may include CUDA)")
|
print("[build] Installing PyTorch (default, may include CUDA)")
|
||||||
pkg_install("install", "torch", "torchaudio")
|
pip_install("torch", "torchaudio")
|
||||||
|
|
||||||
# Install project and dev deps (includes pyinstaller)
|
# Install project and dev deps (includes pyinstaller)
|
||||||
print("[build] Installing project dependencies")
|
print("[build] Installing project dependencies")
|
||||||
pkg_install("install", "-e", f"{SCRIPT_DIR}[dev]")
|
pip_install("-e", f"{SCRIPT_DIR}[dev]")
|
||||||
|
|
||||||
return Path(python)
|
return Path(python)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user