Skip to content

Commit 44fe0fe

Browse files
committed
move get-pip to s3
1 parent b8d1035 commit 44fe0fe

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

bin/steps/python

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,15 @@ if [ ! "$SKIP_INSTALL" ]; then
9797
hash -r
9898
fi
9999

100+
# Heroku uses the get-pip utility maintained by the Python community to vendor Pip.
101+
# https://github.com/pypa/get-pip
102+
GETPIP="https://lang-python.s3.amazonaws.com/etc/get-pip.py"
103+
104+
if ! curl "${GETPIP}" -o "$ROOT_DIR/get-pip.py"; then
105+
mcount "failure.python.get-pip"
106+
echo "Failed to pull down get-pip"
107+
exit 1
108+
fi
100109

101110
# If Pip isn't up to date:
102111
if [ "$FRESH_PYTHON" ] || [[ ! $(pip --version) == *$PIP_UPDATE* ]]; then
@@ -107,7 +116,7 @@ if [ "$FRESH_PYTHON" ] || [[ ! $(pip --version) == *$PIP_UPDATE* ]]; then
107116
rm -fr /app/.heroku/python/lib/python*/site-packages/pip-*
108117
rm -fr /app/.heroku/python/lib/python*/site-packages/setuptools-*
109118

110-
/app/.heroku/python/bin/python "$ROOT_DIR/vendor/get-pip.py" pip=="$PIP_UPDATE" &> /dev/null
119+
/app/.heroku/python/bin/python "$ROOT_DIR/get-pip.py" pip=="$PIP_UPDATE" &> /dev/null
111120
/app/.heroku/python/bin/pip install "$ROOT_DIR/vendor/setuptools-39.0.1-py2.py3-none-any.whl" &> /dev/null
112121
fi
113122

0 commit comments

Comments
 (0)