File tree 1 file changed +14
-13
lines changed
1 file changed +14
-13
lines changed Original file line number Diff line number Diff line change 29
29
30
30
if virtualenv --system-site-packages . ; then
31
31
echo -e;
32
- (
33
- source bin/activate
34
- pip install --upgrade pip
35
- )
36
32
else
37
33
cat << EOF
38
34
Was unable to set up the virtualenv environment. Please see output for errors.
43
39
44
40
source bin/activate
45
41
46
- # Check if the dependencies are installed
47
- pip install --no-download -r requirements.txt > /dev/null 2>&1
48
- if [ $? -ne 0 ]; then
49
- # Install dependencies
50
- pip install -r requirements.txt --upgrade
42
+ function ensureRequirementsMet() {
43
+ # Check if installed
44
+ pip install --no-download $@ > /dev/null 2>&1
51
45
if [ $? -ne 0 ]; then
52
- cat << EOF
53
- Unable to install the required dependencies. Please see error output above.
46
+ # Install dependencies
47
+ pip install --upgrade $@
48
+ if [ $? -ne 0 ]; then
49
+ cat << EOF
50
+ Unable to install dependencies. Please see error output above.
54
51
EOF
55
- exit 1
52
+ exit 1
53
+ fi
56
54
fi
57
- fi
55
+ }
56
+
57
+ ensureRequirementsMet ' pip>=1.5'
58
+ ensureRequirementsMet -r requirements.txt
58
59
59
60
cd $OLD_PWD
You can’t perform that action at this time.
0 commit comments