blob: 1a5a29e37cd8f13e7b1c5e7e9dd2d98074eae2eb (
plain)
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
|
echo "Setting up venv"
python3 -m venv venv # 1>/dev/null 2>/dev/null
res_code=$?
if [ $res_code -ne 0 ];
then
echo "Please make sure python3 is installed on your machine and that you have the right to create a venv here"
return;
fi
echo "activating the venv"
. venv/bin/activate # 1>/dev/null 2>/dev/null
res_code=$?
if [ $res_code -ne 0 ];
then
echo "could not activate the venv, please check that $PWD/venv/bin/activate exists and that you have the right to source it"
return;
fi
echo "adding the necessary packages to the venv"
pip install -r requirements.txt
if [ $res_code -ne 0 ];
then
echo "could not download all requirements in the file $PWD/requirements.txt"
return;
fi
echo "venv correctly setup at $PWD"
|