From 44fe0fe3fd3fd6d8be6d7eb247c8d808306981bc Mon Sep 17 00:00:00 2001 From: Casey Faist Date: Fri, 6 Sep 2019 06:58:51 -0700 Subject: [PATCH] move get-pip to s3 --- bin/steps/python | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/bin/steps/python b/bin/steps/python index a0bdca4..a924c63 100755 --- a/bin/steps/python +++ b/bin/steps/python @@ -97,6 +97,15 @@ if [ ! "$SKIP_INSTALL" ]; then hash -r fi +# Heroku uses the get-pip utility maintained by the Python community to vendor Pip. +# https://github.com/pypa/get-pip +GETPIP="https://lang-python.s3.amazonaws.com/etc/get-pip.py" + +if ! curl "${GETPIP}" -o "$ROOT_DIR/get-pip.py"; then + mcount "failure.python.get-pip" + echo "Failed to pull down get-pip" + exit 1 +fi # If Pip isn't up to date: if [ "$FRESH_PYTHON" ] || [[ ! $(pip --version) == *$PIP_UPDATE* ]]; then @@ -107,7 +116,7 @@ if [ "$FRESH_PYTHON" ] || [[ ! $(pip --version) == *$PIP_UPDATE* ]]; then rm -fr /app/.heroku/python/lib/python*/site-packages/pip-* rm -fr /app/.heroku/python/lib/python*/site-packages/setuptools-* - /app/.heroku/python/bin/python "$ROOT_DIR/vendor/get-pip.py" pip=="$PIP_UPDATE" &> /dev/null + /app/.heroku/python/bin/python "$ROOT_DIR/get-pip.py" pip=="$PIP_UPDATE" &> /dev/null /app/.heroku/python/bin/pip install "$ROOT_DIR/vendor/setuptools-39.0.1-py2.py3-none-any.whl" &> /dev/null fi