Skip to content

Commit 589ed90

Browse files
authored
uv environment setup script (#1746)
setup script
1 parent 37a9704 commit 589ed90

File tree

2 files changed

+18
-11
lines changed

2 files changed

+18
-11
lines changed

setup.sh

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/bash
2+
set -e
3+
4+
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)"
5+
cd $DIR
6+
7+
# TODO: why doesn't uv do this?
8+
export PYTHONPATH=$DIR
9+
10+
# *** dependencies install ***
11+
if ! command -v uv &>/dev/null; then
12+
echo "'uv' is not installed. Installing 'uv'..."
13+
curl -LsSf https://astral.sh/uv/install.sh | sh
14+
fi
15+
16+
uv sync --all-extras
17+
source .venv/bin/activate

test.sh

+1-11
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,7 @@ set -e
44
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)"
55
cd $DIR
66

7-
# TODO: why doesn't uv do this?
8-
export PYTHONPATH=$DIR
9-
10-
# *** dependencies install ***
11-
if ! command -v uv &>/dev/null; then
12-
echo "'uv' is not installed. Installing 'uv'..."
13-
curl -LsSf https://astral.sh/uv/install.sh | sh
14-
fi
15-
16-
uv sync --all-extras
17-
source .venv/bin/activate
7+
source ./setup.sh
188

199
# *** build ***
2010
scons -j8

0 commit comments

Comments
 (0)