uv environment setup script (#1746)

setup script
This commit is contained in:
Shane Smiskol
2025-02-18 20:52:30 -08:00
committed by GitHub
parent 37a97041a9
commit 589ed90181
2 changed files with 18 additions and 11 deletions

17
setup.sh Executable file
View File

@@ -0,0 +1,17 @@
#!/bin/bash
set -e
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)"
cd $DIR
# TODO: why doesn't uv do this?
export PYTHONPATH=$DIR
# *** dependencies install ***
if ! command -v uv &>/dev/null; then
echo "'uv' is not installed. Installing 'uv'..."
curl -LsSf https://astral.sh/uv/install.sh | sh
fi
uv sync --all-extras
source .venv/bin/activate

12
test.sh
View File

@@ -4,17 +4,7 @@ set -e
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)"
cd $DIR
# TODO: why doesn't uv do this?
export PYTHONPATH=$DIR
# *** dependencies install ***
if ! command -v uv &>/dev/null; then
echo "'uv' is not installed. Installing 'uv'..."
curl -LsSf https://astral.sh/uv/install.sh | sh
fi
uv sync --all-extras
source .venv/bin/activate
source ./setup.sh
# *** build ***
scons -j8