From 179f345f5b63d0ea4ec97729d913c3056d737d6f Mon Sep 17 00:00:00 2001 From: Casey Faist Date: Mon, 23 Dec 2019 00:16:20 -0500 Subject: [PATCH] add beta Pypy support --- bin/compile | 2 ++ bin/default_pythons | 6 +++++- bin/steps/python | 14 ++++++++++++++ 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/bin/compile b/bin/compile index 9319463..3f8ce2a 100755 --- a/bin/compile +++ b/bin/compile @@ -58,6 +58,8 @@ PY36="python-3.6" PY35="python-3.5" PY34="python-3.4" PY27="python-2.7" +PYPY27="pypy2.7" +PYPY36="pypy3.6" # Which stack is used (for binary downloading), if none is provided (e.g. outside of Heroku)? DEFAULT_PYTHON_STACK="cedar-14" diff --git a/bin/default_pythons b/bin/default_pythons index c37d9d8..a648667 100755 --- a/bin/default_pythons +++ b/bin/default_pythons @@ -7,6 +7,8 @@ LATEST_36="python-3.6.10" LATEST_35="python-3.5.7" LATEST_34="python-3.4.10" LATEST_27="python-2.7.17" +PYPY_36="pypy3.6-7.2.0" +PYPY_27="pypy2.7-7.2.0" export DEFAULT_PYTHON_VERSION \ LATEST_38 \ @@ -14,4 +16,6 @@ export DEFAULT_PYTHON_VERSION \ LATEST_36 \ LATEST_35 \ LATEST_34 \ - LATEST_27 + LATEST_27 \ + PYPY_36 \ + PYPY_27 diff --git a/bin/steps/python b/bin/steps/python index 9046552..a2971f1 100755 --- a/bin/steps/python +++ b/bin/steps/python @@ -61,6 +61,20 @@ if curl --output /dev/null --silent --head --fail "$VENDORED_PYTHON"; then echo " Learn More: https://devcenter.heroku.com/articles/python-runtimes" fi fi + if [[ "$PYTHON_VERSION" == $PYPY27* ]]; then + # security update note + if [ "$PYTHON_VERSION" != "$PYPY_27" ]; then + puts-warn "Could not find that Pypy version. Did you mean" "${PYPY_27}?" + echo " Learn More: https://devcenter.heroku.com/articles/python-runtimes" + fi + fi + if [[ "$PYTHON_VERSION" == $PYPY36* ]]; then + # security update note + if [ "$PYTHON_VERSION" != "$PYPY_36" ]; then + puts-warn "Could not find that Pypy version. Did you mean" "${PYPY_36}?" + echo " Learn More: https://devcenter.heroku.com/articles/python-runtimes" + fi + fi else puts-warn "Requested runtime ($PYTHON_VERSION) is not available for this stack ($STACK)." puts-warn "Aborting. More info: https://devcenter.heroku.com/articles/python-support"