From 00e70fffc9c82e5c646572c12a45dd7afa799fa9 Mon Sep 17 00:00:00 2001 From: Ed Morley <501702+edmorley@users.noreply.github.com> Date: Wed, 29 Jul 2020 01:49:47 +0100 Subject: [PATCH] Correctly handle failed pip/setuptools/wheel installs (#1007) They are now displayed in the build output (instead of being sent to `/dev/null`) and fail the build early instead of failing later in `bin/steps/pip-install`. Fixes #1002. --- CHANGELOG.md | 1 + bin/steps/python | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7c0bef4f6..6edc6ba7d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ - For repeat builds, also manage the installed versions of setuptools/wheel, rather than just that of pip (#1007). - 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). +- Errors installing pip/setuptools/wheel are now displayed in the build output and fail the build early (#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). diff --git a/bin/steps/python b/bin/steps/python index b80e61977..34541be58 100755 --- a/bin/steps/python +++ b/bin/steps/python @@ -135,6 +135,8 @@ if [ ! "$SKIP_INSTALL" ]; then hash -r fi +set -e + PIP_VERSION='20.0.2' SETUPTOOLS_VERSION='39.0.1' WHEEL_VERSION='0.34.2' @@ -174,8 +176,7 @@ fi puts-step "Installing pip ${PIP_VERSION}, setuptools ${SETUPTOOLS_VERSION} and wheel ${WHEEL_VERSION}" -/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 +/app/.heroku/python/bin/python "${PIP_WHEEL}/pip" install --quiet --disable-pip-version-check --no-cache \ + "${PIP_TO_INSTALL}" "setuptools==${SETUPTOOLS_VERSION}" "wheel==${WHEEL_VERSION}" -set -e hash -r