4
4
# exporting these variables into the shell environment before
5
5
# sourcing this script. If these variables exist before this
6
6
# script is sourced, then the pre-existing values will be used.
7
+ WERKZEUG_VERSION=" ${WERKZEUG_VERSION:- 0.16.0} "
7
8
FLASK_VERSION=" ${FLASK_VERSION:- 0.12.1} "
8
9
WTFORMS_VERSION=" ${WTFORMS_VERSION:- 2.1} "
9
10
FLASK_SESSION_VERSION=" ${FLASK_SESSION_VERSION:- 0.2.3} "
39
40
# Check for correct python version
40
41
VERSION=` python2 --version | awk ' {print $2}' `
41
42
if [ " ${VERSION: 0: 1} " -ne " 2" ] || [ " ${VERSION: 2: 1} " -ne " 7" ] ; then
42
- echo " You must use Python 2.7. You are using $VERSION "
43
+ echo " You must use Python 2.7. You are using $VERSION "
43
44
return 1
44
45
else
45
- echo -e " You are using Python $VERSION "
46
+ echo -e " You are using Python $VERSION "
46
47
fi
47
48
48
49
# Create and activate a clean virtual environment.
@@ -59,6 +60,7 @@ pip install --upgrade pip
59
60
60
61
# Install specific versions of libraries to avoid
61
62
# different behaviors of applications over time.
63
+ pip install " werkzeug==$WERKZEUG_VERSION "
62
64
63
65
pip install " flask==$FLASK_VERSION " # 0.12.1
64
66
# http://flask.pocoo.org/
@@ -89,13 +91,3 @@ pip install "openpyxl==$OPENPYXL_VERSION" #2.4.5
89
91
90
92
pip install " unidecode==$UNIDECODE_VERSION " # 0.4.20
91
93
# https://pypi.python.org/pypi/Unidecode
92
-
93
- # TODO: A better approach to dealing with this would be to figure out what causes the
94
- # werkzeug version to be 1.x.x
95
- # I believe it is python version because I get this while uninstalling
96
-
97
- # /home/manalaih_ssdt/chemical-inventory/venv/lib/python2.7/site-packages/Werkzeug-1.0.1.dist-info/*
98
- # /home/manalaih_ssdt/chemical-inventory/venv/lib/python2.7/site-packages/werkzeug/*
99
-
100
- pip uninstall " werkzeug"
101
- pip install " werkzeug==0.16.0"
0 commit comments