From 47a8b4b3b9a9207e3be5b7b852b4b2cae566bbae Mon Sep 17 00:00:00 2001 From: Ed Morley <501702+edmorley@users.noreply.github.com> Date: Tue, 28 Jul 2020 21:17:41 +0100 Subject: [PATCH] Output the installed version of setuptools in the build log (#1007) Since: * "explicit is better than implicit" * we'll soon be upgrading setuptools, and debugging breakage caused by upgrades will be easier if versions are visible in the build log --- CHANGELOG.md | 2 +- bin/steps/python | 5 +++-- test/run-features | 2 +- test/run-versions | 18 +++++++++--------- 4 files changed, 14 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c2b7b74..ef490fa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ # Master -- Output the installed version of pip in the build log (#1007). +- Output the installed version of pip and setuptools in the build log (#1007). - Reduce the number of environment variables exposed to `bin/{pre,post}_compile` and other subprocesses (#1011) # 173 (2020-07-21) diff --git a/bin/steps/python b/bin/steps/python index 5129f5b..cab5f79 100755 --- a/bin/steps/python +++ b/bin/steps/python @@ -137,6 +137,7 @@ if [ ! "$SKIP_INSTALL" ]; then fi PIP_VERSION='20.0.2' +SETUPTOOLS_VERSION='39.0.1' if [[ "${PYTHON_VERSION}" == ${PY34}* ]]; then # Python 3.4 support was dropped in pip 19.2+. @@ -162,14 +163,14 @@ fi # If a new Python has been installed or Pip isn't up to date: if [ "$FRESH_PYTHON" ] || [[ ! $(pip --version) == *${PIP_VERSION}* ]]; then - puts-step "Installing pip ${PIP_VERSION}" + puts-step "Installing pip ${PIP_VERSION} and setuptools ${SETUPTOOLS_VERSION}" # Remove old installations. rm -fr /app/.heroku/python/lib/python*/site-packages/pip-* rm -fr /app/.heroku/python/lib/python*/site-packages/setuptools-* /app/.heroku/python/bin/python "$GETPIP_PY" pip=="${PIP_VERSION}" &> /dev/null - /app/.heroku/python/bin/pip install "$ROOT_DIR/vendor/setuptools-39.0.1-py2.py3-none-any.whl" &> /dev/null + /app/.heroku/python/bin/pip install "$ROOT_DIR/vendor/setuptools-${SETUPTOOLS_VERSION}-py2.py3-none-any.whl" &> /dev/null fi set -e diff --git a/test/run-features b/test/run-features index 170a8a9..1c059c8 100755 --- a/test/run-features +++ b/test/run-features @@ -44,7 +44,7 @@ testStandardRequirements() { testPipenv() { compile "pipenv" - assertCaptured "Installing pip 9.0.2" + assertCaptured "Installing pip 9.0.2 and setuptools 39.0.1" assertCapturedSuccess } diff --git a/test/run-versions b/test/run-versions index 6fe7c13..49775d8 100755 --- a/test/run-versions +++ b/test/run-versions @@ -9,7 +9,7 @@ testPythonDefault() { compile "pythonDefault" assertCaptured $DEFAULT_PYTHON_VERSION assertNotCaptured "security update" - assertCaptured "Installing pip 20.0.2" + assertCaptured "Installing pip 20.0.2 and setuptools 39.0.1" assertCaptured "Installing SQLite3" assertCapturedSuccess } @@ -25,7 +25,7 @@ testPython2() { assertNotCaptured "python-2-7-eol-faq"; fi assertNotCaptured "security update" - assertCaptured "Installing pip 20.0.2" + assertCaptured "Installing pip 20.0.2 and setuptools 39.0.1" assertCaptured "Installing SQLite3" assertCapturedSuccess } @@ -53,7 +53,7 @@ testPython3_4() { compile "python3_4" assertCaptured $LATEST_34 assertNotCaptured "security update" - assertCaptured "Installing pip 19.1.1" + assertCaptured "Installing pip 19.1.1 and setuptools 39.0.1" # if cedar 14 and legacy binaries, fail. if cedar 14 and staging, succeed. if [[ ! -n $USE_STAGING_BINARIES ]] && [[ $STACK == "cedar-14" ]]; then assertCapturedError @@ -89,7 +89,7 @@ testPython3_5() { compile "python3_5" assertCaptured $LATEST_35 assertNotCaptured "security update" - assertCaptured "Installing pip 20.0.2" + assertCaptured "Installing pip 20.0.2 and setuptools 39.0.1" assertCaptured "Installing SQLite3" assertCapturedSuccess } @@ -112,7 +112,7 @@ testPython3_6() { compile "python3_6" assertCaptured $LATEST_36 assertNotCaptured "security update" - assertCaptured "Installing pip 20.0.2" + assertCaptured "Installing pip 20.0.2 and setuptools 39.0.1" assertCaptured "Installing SQLite3" assertCapturedSuccess } @@ -139,7 +139,7 @@ testPython3_7() { else assertNotCaptured "security update" assertCaptured $LATEST_37 - assertCaptured "Installing pip 20.0.2" + assertCaptured "Installing pip 20.0.2 and setuptools 39.0.1" assertCaptured "Installing SQLite3" assertCapturedSuccess fi @@ -183,7 +183,7 @@ testPython3_8() { else assertNotCaptured "security update" assertCaptured $LATEST_38 - assertCaptured "Installing pip 20.0.2" + assertCaptured "Installing pip 20.0.2 and setuptools 39.0.1" assertCaptured "Installing SQLite3" assertCapturedSuccess fi @@ -202,7 +202,7 @@ testPypy3_6() { else assertCaptured "Installing pypy" assertCaptured "$PYPY_36" - assertCaptured "Installing pip 20.0.2" + assertCaptured "Installing pip 20.0.2 and setuptools 39.0.1" assertCapturedSuccess fi } @@ -214,7 +214,7 @@ testPypy2_7() { else assertCaptured "Installing pypy" assertCaptured "$PYPY_27" - assertCaptured "Installing pip 20.0.2" + assertCaptured "Installing pip 20.0.2 and setuptools 39.0.1" assertCapturedSuccess fi }