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:
parent
30a3cd75cf
commit
1f4186512e
3 changed files with 46 additions and 4 deletions
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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue