File tree Expand file tree Collapse file tree 2 files changed +15
-23
lines changed Expand file tree Collapse file tree 2 files changed +15
-23
lines changed Original file line number Diff line number Diff line change @@ -65,26 +65,6 @@ PYPY36="pypy3.6"
65
65
66
66
# Which stack is used (for binary downloading), if none is provided (e.g. outside of Heroku)?
67
67
DEFAULT_PYTHON_STACK=" cedar-14"
68
- # If pip doesn't match this version (the version we install), run the installer.
69
- PIP_UPDATE=" 20.0.2"
70
-
71
- for file in " $BUILD_DIR /runtime.txt" " $CACHE_DIR /.heroku/python-version" ; do
72
- [ -f " $file " ] || continue
73
-
74
- version=$( tr -d ' [:space:]' < " $file " )
75
-
76
- case " $version " in " $PY34 " * )
77
- # Python 3.4 support was dropped in pip >= 19.2.
78
- PIP_UPDATE=" 19.1.1"
79
- break
80
- ;;
81
- esac
82
- done
83
-
84
- if [[ -f " $BUILD_DIR /Pipfile" ]]; then
85
- # Do not force pipenv users to re-install pipenv locally.
86
- PIP_UPDATE=" 9.0.2"
87
- fi
88
68
89
69
# Common Problem Warnings:
90
70
# This section creates a temporary file in which to stick the output of `pip install`.
Original file line number Diff line number Diff line change @@ -136,6 +136,18 @@ if [ ! "$SKIP_INSTALL" ]; then
136
136
hash -r
137
137
fi
138
138
139
+ PIP_VERSION=' 20.0.2'
140
+
141
+ if [[ " ${PYTHON_VERSION} " == ${PY34} * ]]; then
142
+ # Python 3.4 support was dropped in pip 19.2+.
143
+ PIP_VERSION=' 19.1.1'
144
+ fi
145
+
146
+ if [[ -f " $BUILD_DIR /Pipfile" ]]; then
147
+ # The buildpack is pinned to old pipenv, which requires older pip.
148
+ PIP_VERSION=' 9.0.2'
149
+ fi
150
+
139
151
# Heroku uses the get-pip utility maintained by the Python community to vendor Pip.
140
152
# https://github.com/pypa/get-pip
141
153
GETPIP_URL=" https://lang-python.s3.amazonaws.com/etc/get-pip.py"
@@ -148,15 +160,15 @@ if ! curl -s "${GETPIP_URL}" -o "$GETPIP_PY" &> /dev/null; then
148
160
fi
149
161
150
162
# If a new Python has been installed or Pip isn't up to date:
151
- if [ " $FRESH_PYTHON " ] || [[ ! $( pip --version) == * $PIP_UPDATE * ]]; then
163
+ if [ " $FRESH_PYTHON " ] || [[ ! $( pip --version) == * ${PIP_VERSION} * ]]; then
152
164
153
- puts-step " Installing pip ${PIP_UPDATE } "
165
+ puts-step " Installing pip ${PIP_VERSION } "
154
166
155
167
# Remove old installations.
156
168
rm -fr /app/.heroku/python/lib/python* /site-packages/pip-*
157
169
rm -fr /app/.heroku/python/lib/python* /site-packages/setuptools-*
158
170
159
- /app/.heroku/python/bin/python " $GETPIP_PY " pip==" $PIP_UPDATE " & > /dev/null
171
+ /app/.heroku/python/bin/python " $GETPIP_PY " pip==" ${PIP_VERSION} " & > /dev/null
160
172
/app/.heroku/python/bin/pip install " $ROOT_DIR /vendor/setuptools-39.0.1-py2.py3-none-any.whl" & > /dev/null
161
173
fi
162
174
You can’t perform that action at this time.
0 commit comments