File tree Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Original file line number Diff line number Diff line change 101
101
# https://github.com/pypa/get-pip
102
102
GETPIP=" https://lang-python.s3.amazonaws.com/etc/get-pip.py"
103
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
104
+ # Grab SHA from get-pip
105
+ CHECK_SHA=" $( curl -s " $GETPIP " | sha256sum | cut -d ' ' -f 1) "
106
+
107
+ # validate the sha is the same one we want
108
+ if [ ! " $CHECK_SHA " == " $GETPIP_SHA " ]; then
109
+ mcount " failure.python.get-pip.wrong-sha"
110
+ echo " Incorrect SHA found"
111
+ exit 1
112
+ else
113
+ curl " $GETPIP " -o " $ROOT_DIR /get-pip.py"
114
+ mcount " python.get-pip.install"
108
115
fi
109
116
110
117
# If Pip isn't up to date:
@@ -116,7 +123,7 @@ if [ "$FRESH_PYTHON" ] || [[ ! $(pip --version) == *$PIP_UPDATE* ]]; then
116
123
rm -fr /app/.heroku/python/lib/python* /site-packages/pip-*
117
124
rm -fr /app/.heroku/python/lib/python* /site-packages/setuptools-*
118
125
119
- /app/.heroku/python/bin/python " $ROOT_DIR /get-pip.py" pip==" $PIP_UPDATE " & > /dev/null
126
+ /app/.heroku/python/bin/python " $ROOT_DIR /get-pip.py" pip==" $PIP_UPDATE " # &> /dev/null
120
127
/app/.heroku/python/bin/pip install " $ROOT_DIR /vendor/setuptools-39.0.1-py2.py3-none-any.whl" & > /dev/null
121
128
fi
122
129
You can’t perform that action at this time.
0 commit comments