From 60f2fac8e18648a7e422e102a5c59fa71a8d9ea7 Mon Sep 17 00:00:00 2001 From: Ed Morley <501702+edmorley@users.noreply.github.com> Date: Wed, 29 Jul 2020 09:25:27 +0100 Subject: [PATCH] Disable pip's version check + cache when installing pip/setuptools/wheel (#1007) Since the version check is redundant given we control/choose the version. The pip cache is redundant since we instead cache site-packages. The pip cache also ends up in `/app` so isn't included in the build cache anyway. --- CHANGELOG.md | 1 + bin/steps/python | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 65e22ee..7c0bef4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ - Install an explicit version of wheel rather than the latest release at the time (#1007). - Output the installed version of pip, setuptools and wheel in the build log (#1007). - Install pip using itself rather than `get-pip.py` (#1007). +- Disable pip's version check + cache when installing pip/setuptools/wheel (#1007). - Install setuptools from PyPI rather than a vendored copy (#1007). - Reduce the number of environment variables exposed to `bin/{pre,post}_compile` and other subprocesses (#1011) diff --git a/bin/steps/python b/bin/steps/python index 2226090..b80e619 100755 --- a/bin/steps/python +++ b/bin/steps/python @@ -174,7 +174,8 @@ fi puts-step "Installing pip ${PIP_VERSION}, setuptools ${SETUPTOOLS_VERSION} and wheel ${WHEEL_VERSION}" -/app/.heroku/python/bin/python "${PIP_WHEEL}/pip" install "${PIP_TO_INSTALL}" "setuptools==${SETUPTOOLS_VERSION}" "wheel==${WHEEL_VERSION}" &> /dev/null +/app/.heroku/python/bin/python "${PIP_WHEEL}/pip" install --disable-pip-version-check --no-cache \ + "${PIP_TO_INSTALL}" "setuptools==${SETUPTOOLS_VERSION}" "wheel==${WHEEL_VERSION}" &> /dev/null set -e hash -r