Skip to content
This repository was archived by the owner on Dec 5, 2022. It is now read-only.

Commit 83f4b37

Browse files
edmorleydryan
authored andcommitted
Install pip and setuptools in the same pip invocation (heroku#1007)
`get-pip.py` installs setuptools itself (if it's not already installed): https://pip.pypa.io/en/stable/installing/#installing-with-get-pip-py https://github.com/pypa/get-pip/blob/eff16c878c7fd6b688b9b4c4267695cf1a0bf01b/templates/default.py#L152-L153 This means that previously the latest version of setuptools (currently `49.2.0`) was being installed from PyPI, and then immediately after the target version (currently `39.0.1`) installed over it. This added time to the build unnecessarily. The version of setuptools installed by `get-pip.py` can be overridden by passing in a version as a normal requirements specifier. Fixes heroku#1001.
1 parent 8f0b557 commit 83f4b37

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

bin/steps/python

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,8 +169,7 @@ if [ "$FRESH_PYTHON" ] || [[ ! $(pip --version) == *${PIP_VERSION}* ]]; then
169169
rm -fr /app/.heroku/python/lib/python*/site-packages/pip-*
170170
rm -fr /app/.heroku/python/lib/python*/site-packages/setuptools-*
171171

172-
/app/.heroku/python/bin/python "$GETPIP_PY" pip=="${PIP_VERSION}" &> /dev/null
173-
/app/.heroku/python/bin/pip install "setuptools==${SETUPTOOLS_VERSION}" &> /dev/null
172+
/app/.heroku/python/bin/python "$GETPIP_PY" pip=="${PIP_VERSION}" "setuptools==${SETUPTOOLS_VERSION}" &> /dev/null
174173
fi
175174

176175
set -e

0 commit comments

Comments
 (0)