-
Notifications
You must be signed in to change notification settings - Fork 1
/
install
executable file
·40 lines (35 loc) · 905 Bytes
/
install
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/bin/bash
set -e
# Check if UV is not found
if ! command -v uv &> /dev/null; then
# If Darwin (macOS), use brew to install UV
if [[ "$OSTYPE" == "darwin"* ]]; then
brew install uv
else
# If it's Windows, use pip to install UV, else use pip3
if [[ "$OSTYPE" == "msys" ]]; then
pip install uv
else
pip3 install uv
fi
fi
fi
uv venv --python 3.11 --seed
uv run pip install -e .
# If requirements.testing.txt exists, then install it
if [[ -f requirements.testing.txt ]]; then
uv run pip install -r requirements.testing.txt
fi
# If activate exists, delete it
if [[ -f activate ]]; then
rm activate
fi
# If Windows, then symlink .venv/Scripts/activate to .venv/bin/activate
if [[ "$OSTYPE" == "msys" ]]; then
ln -s .venv/Scripts/activate ./activate
if [[ -d .git ]]; then
git add ./activate --chmod=+x
fi
else
ln -s .venv/bin/activate ./activate
fi