-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathinstall
More file actions
37 lines (32 loc) · 837 Bytes
/
install
File metadata and controls
37 lines (32 loc) · 837 Bytes
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
#!/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 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
else
ln -s .venv/bin/activate ./activate
fi