From 466cc51bc394502603391b8110e0981321d97793 Mon Sep 17 00:00:00 2001 From: Orfeo Terkuci Date: Tue, 24 Mar 2026 20:04:10 +0100 Subject: [PATCH] Update start scripts --- start.bat | 4 ++-- start.sh | 15 +++++++++++++-- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/start.bat b/start.bat index 38334e0..4953bc2 100644 --- a/start.bat +++ b/start.bat @@ -45,7 +45,7 @@ echo [*] Setting up backend... cd backend if not exist "venv\" ( echo [*] Creating Python virtual environment... - python -m venv venv + uv venv if %errorlevel% neq 0 ( echo [!] ERROR: Failed to create virtual environment. pause @@ -54,7 +54,7 @@ if not exist "venv\" ( ) call venv\Scripts\activate.bat echo [*] Installing Python dependencies (this may take a minute)... -pip install -q -r requirements.txt +uv sync --frozen if %errorlevel% neq 0 ( echo. echo [!] ERROR: pip install failed. See errors above. diff --git a/start.sh b/start.sh index 5455f30..bf6e54b 100644 --- a/start.sh +++ b/start.sh @@ -36,6 +36,17 @@ if [ "$PY_MINOR" -ge 13 ] 2>/dev/null; then echo "" fi +# Setup UV (Python package manager) +if ! command -v uv &> /dev/null; then + echo "[*] UV not found. Installing UV (Python package manager)..." + curl -LsSf https://astral.sh/uv/install.sh | sh + if [ $? -ne 0 ]; then + echo "[!] ERROR: Failed to install UV." + exit 1 + fi + export PATH="$HOME/.local/bin:$PATH" + echo "[*] UV installed successfully." + # Get the directory where this script lives SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" @@ -44,7 +55,7 @@ echo "[*] Setting up backend..." cd "$SCRIPT_DIR/backend" if [ ! -d "venv" ]; then echo "[*] Creating Python virtual environment..." - $PYTHON_CMD -m venv venv + uv venv if [ $? -ne 0 ]; then echo "[!] ERROR: Failed to create virtual environment." exit 1 @@ -53,7 +64,7 @@ fi source venv/bin/activate echo "[*] Installing Python dependencies (this may take a minute)..." -pip install -q -r requirements.txt +uv sync --frozen if [ $? -ne 0 ]; then echo "" echo "[!] ERROR: pip install failed. See errors above."