@@ -12,17 +12,29 @@ if [[ $PYTHON_VERSION =~ ^python-2 ]]; then
12
12
puts-warn " The latest version of Python 2 is $LATEST_2 (you are using $PYTHON_VERSION , which is unsupported)."
13
13
puts-warn " We recommend upgrading by specifying the latest version ($LATEST_2 )."
14
14
echo " Learn More: https://devcenter.heroku.com/articles/python-runtimes"
15
+ else
16
+ echo " Using supported version of Python 2 ($PYTHON_VERSION )"
15
17
fi
16
18
else
17
- if [[ $PYTHON_VERSION =~ ^python-3.7 ]] && [[ " $PYTHON_VERSION " != " $LATEST_37 " ]]; then
18
- puts-warn " The latest version of Python 3.7 is $LATEST_37 (you are using $PYTHON_VERSION , which is unsupported)."
19
- puts-warn " We recommend upgrading by specifying the latest version ($LATEST_37 )."
20
- echo " Learn More: https://devcenter.heroku.com/articles/python-runtimes"
21
- else
22
- if [[ " $PYTHON_VERSION " != " $LATEST_36 " ]]; then
23
- puts-warn " The latest version of Python 3.6 is $LATEST_36 (you are using $PYTHON_VERSION , which is unsupported)."
24
- puts-warn " We recommend upgrading by specifying the latest version ($LATEST_36 )."
19
+ if [[ $PYTHON_VERSION =~ ^python-3 ]]; then
20
+ if [[ $PYTHON_VERSION =~ ^python-3.7 ]]; then
21
+ if [[ " $PYTHON_VERSION " != " $LATEST_37 " ]]; then
22
+ puts-warn " The latest version of Python 3.7 is $LATEST_37 (you are using $PYTHON_VERSION , which is unsupported)."
23
+ puts-warn " We recommend upgrading by specifying the latest version ($LATEST_37 )."
25
24
echo " Learn More: https://devcenter.heroku.com/articles/python-runtimes"
25
+ else
26
+ echo " Using supported version of Python 3.7 ($PYTHON_VERSION )"
27
+ fi
28
+ else
29
+ if [[ $PYTHON_VERSION =~ ^python-3.6 ]]; then
30
+ if [[ " $PYTHON_VERSION " != " $LATEST_36 " ]]; then
31
+ puts-warn " The latest version of Python 3.6 is $LATEST_36 (you are using $PYTHON_VERSION , which is unsupported)."
32
+ puts-warn " We recommend upgrading by specifying the latest version ($LATEST_36 )."
33
+ echo " Learn More: https://devcenter.heroku.com/articles/python-runtimes"
34
+ else
35
+ echo " Using supported version of Python 3.6 ($PYTHON_VERSION )"
36
+ fi
37
+ fi
26
38
fi
27
39
fi
28
40
fi
@@ -49,6 +61,7 @@ if [ -f .heroku/python-version ]; then
49
61
fi
50
62
fi
51
63
64
+
52
65
if [ ! " $SKIP_INSTALL " ]; then
53
66
puts-step " Installing $PYTHON_VERSION "
54
67
@@ -71,6 +84,7 @@ if [ ! "$SKIP_INSTALL" ]; then
71
84
hash -r
72
85
fi
73
86
87
+
74
88
# If Pip isn't up to date:
75
89
if [ " $FRESH_PYTHON " ] || [[ ! $( pip --version) == * $PIP_UPDATE * ]]; then
76
90
0 commit comments