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:
kingbri 2025-08-19 22:49:13 -04:00
parent 30a3cd75cf
commit 1f4186512e
3 changed files with 46 additions and 4 deletions

View file

@ -2,12 +2,24 @@
cd "$(dirname "$0")" || exit
if command -v uv >/dev/null 2>&1; then
HAS_UV=1
else
HAS_UV=0
fi
if [ -n "$CONDA_PREFIX" ]; then
echo "It looks like you're in a conda environment. Skipping venv check."
else
if [ ! -d "venv" ]; then
echo "Venv doesn't exist! Creating one for you."
python3 -m venv venv
if [ "$HAS_UV" -eq 1 ]; then
echo "It looks like you're using uv. Running appropriate commands."
uv venv venv -p 3.12
else
python3 -m venv venv
fi
if [ -f "start_options.json" ]; then
echo "Removing old start_options.json"