mirror of
https://github.com/theroyallab/tabbyAPI.git
synced 2026-03-14 15:57:27 +00:00
Start: Add check for uv
Uv is the definitive package installation tool for Python, so add support to check for it via the start script. Signed-off-by: kingbri <8082010+kingbri1@users.noreply.github.com>
This commit is contained in:
16
start.bat
16
start.bat
@@ -5,13 +5,27 @@
|
||||
|
||||
cd "%~dp0"
|
||||
|
||||
where uv >nul 2>&1
|
||||
if %errorlevel% equ 0 (
|
||||
echo "HAS UV"
|
||||
set HAS_UV=1
|
||||
) else (
|
||||
set HAS_UV=0
|
||||
)
|
||||
|
||||
:: Don't create a venv if a conda environment is active
|
||||
if exist "%CONDA_PREFIX%" (
|
||||
echo It looks like you're in a conda environment. Skipping venv check.
|
||||
) else (
|
||||
if not exist "venv\" (
|
||||
echo Venv doesn't exist! Creating one for you.
|
||||
python -m venv venv
|
||||
|
||||
if %HAS_UV% equ 1 (
|
||||
echo "It looks like you're using uv. Running appropriate commands."
|
||||
uv venv venv -p 3.12
|
||||
) else (
|
||||
python -m venv venv
|
||||
)
|
||||
|
||||
if exist "start_options.json" (
|
||||
echo Removing old start_options.json
|
||||
|
||||
Reference in New Issue
Block a user