@@ -12,17 +12,34 @@ 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
+ else
38
+ puts-warn " Heroku supports runtime versions $LATEST_37 , $LATEST_36 and $LATEST_2 ."
39
+ puts-warn " You are using $PYTHON_VERSION , which is unsupported."
40
+ puts-warn " We recommend upgrading by specifying the default supported version ($LATEST_36 )."
41
+ echo " Learn More: https://devcenter.heroku.com/articles/python-runtimes"
42
+ fi
26
43
fi
27
44
fi
28
45
fi
@@ -49,6 +66,7 @@ if [ -f .heroku/python-version ]; then
49
66
fi
50
67
fi
51
68
69
+
52
70
if [ ! " $SKIP_INSTALL " ]; then
53
71
puts-step " Installing $PYTHON_VERSION "
54
72
@@ -71,6 +89,7 @@ if [ ! "$SKIP_INSTALL" ]; then
71
89
hash -r
72
90
fi
73
91
92
+
74
93
# If Pip isn't up to date:
75
94
if [ " $FRESH_PYTHON " ] || [[ ! $( pip --version) == * $PIP_UPDATE * ]]; then
76
95
0 commit comments