-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathsetup.sh
More file actions
40 lines (40 loc) · 1.26 KB
/
setup.sh
File metadata and controls
40 lines (40 loc) · 1.26 KB
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
echo "==================================================="
echo "=== Setting up python_v2ray Development ==="
echo "==================================================="
echo ""
# --- 1. Check for Python ---
echo "[1/4] Checking for Python installation..."
if command -v python3 &> /dev/null
then
echo " - ERROR: Python 3 is not installed or not in PATH."
exit 1
fi
echo " - Python 3 found."
echo ""
# --- 2. Create and Activate Virtual Environment ---
echo "[2/4] Creating Python virtual environment in '.venv'..."
if [ -d ".venv" ]; then
python3 -m venv .venv
fi
source .venv/bin/activate
echo ""
# --- 3. Install Python Dependencies ---
echo "[3/4] Installing required Python packages..."
pip install -q --upgrade pip
pip install -q -r requirements.txt
echo " - Python packages installed successfully."
echo ""
# --- 4. Check for Go ---
echo "[4/4] Checking for Go installation..."
if command -v go &> /dev/null
then
echo " - WARNING: Go is not installed or not in PATH."
else
echo " - Go found."
fi
echo ""
echo "==================================================="
echo "=== Setup Complete ==="
echo "==================================================="
deactivate