diff --git a/bin/compile b/bin/compile index de41aa7477c53392e069cb4c1c839cb5703862c6..f173fdee5f907e6126bf4b3f0d6f299afea8e2cb 100755 --- a/bin/compile +++ b/bin/compile @@ -50,7 +50,8 @@ export VENDOR_URL # as well as prompt the user to upgrade if they are using an un–supported version. # Note: When 3.7 lands, I recommend switching to LATEST_36 and LATEST_37. DEFAULT_PYTHON_VERSION="python-3.6.6" -LATEST_3="python-3.6.6" +LATEST_36="python-3.6.6" +LATEST_37="python-3.7.0" LATEST_2="python-2.7.15" # Which stack is used (for binary downloading), if none is provided (e.g. outside of Heroku)? @@ -58,7 +59,7 @@ DEFAULT_PYTHON_STACK="cedar-14" # If pip doesn't match this version (the version we install), run the installer. PIP_UPDATE="9.0.2" -export DEFAULT_PYTHON_VERSION DEFAULT_PYTHON_STACK PIP_UPDATE LATEST_2 LATEST_3 +export DEFAULT_PYTHON_VERSION DEFAULT_PYTHON_STACK PIP_UPDATE LATEST_2 LATEST_36 LATEST_37 # Common Problem Warnings: # This section creates a temporary file in which to stick the output of `pip install`. diff --git a/bin/steps/pipenv-python-version b/bin/steps/pipenv-python-version index d8f6f16f541cc780ef6e4f1ea2bc822d09289339..c8ee06dba2266d1bb1b284f6e3486db48b2e443f 100755 --- a/bin/steps/pipenv-python-version +++ b/bin/steps/pipenv-python-version @@ -22,7 +22,10 @@ if [[ -f $BUILD_DIR/Pipfile ]]; then echo "$LATEST_2" > "$BUILD_DIR/runtime.txt" fi if [ "$PYTHON" = 3.6 ]; then - echo "$LATEST_3" > "$BUILD_DIR/runtime.txt" + echo "$LATEST_36" > "$BUILD_DIR/runtime.txt" + fi + if [ "$PYTHON" = 3.7 ]; then + echo "$LATEST_37" > "$BUILD_DIR/runtime.txt" fi fi diff --git a/bin/steps/python b/bin/steps/python index 0ed98404daf81a82ff88a178ca33af3da199caa4..77df59090cf50d86f963d0f65b835d0ee332453d 100755 --- a/bin/steps/python +++ b/bin/steps/python @@ -14,12 +14,17 @@ if [[ $PYTHON_VERSION =~ ^python-2 ]]; then echo " Learn More: https://devcenter.heroku.com/articles/python-runtimes" fi else - if [[ "$PYTHON_VERSION" != "$LATEST_3" ]]; then - puts-warn "The latest version of Python 3 is $LATEST_3 (you are using $PYTHON_VERSION, which is unsupported)." - puts-warn "We recommend upgrading by specifying the latest version ($LATEST_3)." + if [[ $PYTHON_VERSION =~ ^python-3.7 ]] && [[ "$PYTHON_VERSION" != "$LATEST_37" ]]; then + puts-warn "The latest version of Python 3 is $LATEST_37 (you are using $PYTHON_VERSION, which is unsupported)." + puts-warn "We recommend upgrading by specifying the latest version ($LATEST_37)." echo " Learn More: https://devcenter.heroku.com/articles/python-runtimes" + else + if [[ "$PYTHON_VERSION" != "$LATEST_36" ]]; then + puts-warn "The latest version of Python 3 is $LATEST_36 (you are using $PYTHON_VERSION, which is unsupported)." + puts-warn "We recommend upgrading by specifying the latest version ($LATEST_36)." + echo " Learn More: https://devcenter.heroku.com/articles/python-runtimes" + fi fi - fi if [[ "$STACK" != "$CACHED_PYTHON_STACK" ]]; then