From 31e8f48db8f936f2b0af8c229235012b3da59c5c Mon Sep 17 00:00:00 2001 From: Ed Morley <501702+edmorley@users.noreply.github.com> Date: Tue, 28 Jul 2020 21:26:51 +0100 Subject: [PATCH] Install setuptools from PyPI rather than a vendored copy (#1007) Since: * we'll be updating setuptools soon, and newer setuptools has dropped support for Python versions this buildpack needs to support. As such if we continued to vendor setuptools, we would need to vendor at least three different versions. * we want to try and update setuptools more frequently than we have in the past, which will mean more repo bloat from binary churn. * we're still pinning to a specific version, meaning vendoring doesn't have determinism benefits. * setuptools is only fetched from PyPI for new installs (or where versions have changed), so this doesn't increase build time, load on PyPI, or reliance on PyPI in the common case. * setuptools is already being inadvertently installed from PyPI prior to being installed from the vendored copy (see #1001), so we're in effect already using/depending on PyPI here. * switching to storing setuptools on S3 wouldn't help reliability as much as it would appear at first glance, since the later `pip install` of customer dependencies will fail if PyPI is down anyway. --- CHANGELOG.md | 1 + bin/steps/python | 2 +- vendor/setuptools-39.0.1-py2.py3-none-any.whl | Bin 569436 -> 0 bytes 3 files changed, 2 insertions(+), 1 deletion(-) delete mode 100644 vendor/setuptools-39.0.1-py2.py3-none-any.whl diff --git a/CHANGELOG.md b/CHANGELOG.md index ef490fa94..a359d8f32 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ # Master - Output the installed version of pip and setuptools in the build log (#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) # 173 (2020-07-21) diff --git a/bin/steps/python b/bin/steps/python index cab5f7907..381cc2188 100755 --- a/bin/steps/python +++ b/bin/steps/python @@ -170,7 +170,7 @@ if [ "$FRESH_PYTHON" ] || [[ ! $(pip --version) == *${PIP_VERSION}* ]]; then 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-${SETUPTOOLS_VERSION}-py2.py3-none-any.whl" &> /dev/null + /app/.heroku/python/bin/pip install "setuptools==${SETUPTOOLS_VERSION}" &> /dev/null fi set -e diff --git a/vendor/setuptools-39.0.1-py2.py3-none-any.whl b/vendor/setuptools-39.0.1-py2.py3-none-any.whl deleted file mode 100644 index edc3ca2d8ec3e0af7a305c5b9cf0fe574069ae90..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 569436 zcmV)0K+eBVO9KQH0000806BGXOk7X8MQH#40Db@f01p5F0A*owd0%O6b97;BY%Xwl zEzB_vgFp;K(SA>1xq&nsAQEMYv|M0hkwsZ)Z6nqcxjhgu)im!j^RyeqH`7bn?`