From 515a222cc451c2b7d656f702c6a396c0e6ec407d Mon Sep 17 00:00:00 2001 From: Claudio Jolowicz Date: Thu, 22 Aug 2019 19:31:17 +0200 Subject: [PATCH] Upgrade to pip 19.1.1 for Python 3.4 projects Python 3.4 support was dropped in pip >= 19.2. For projects still on this Python version, use pip 19.1.1 instead of pip 19.2.1. --- bin/compile | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/bin/compile b/bin/compile index fc3d82f..5a0292e 100755 --- a/bin/compile +++ b/bin/compile @@ -64,6 +64,19 @@ DEFAULT_PYTHON_STACK="cedar-14" # If pip doesn't match this version (the version we install), run the installer. PIP_UPDATE="19.2.3" +for file in "$BUILD_DIR/runtime.txt" "$CACHE_DIR/.heroku/python-version" ; do + [ -f "$file" ] || continue + + version=$(tr -d '[:space:]' < "$file") + + case "$version" in "$PY34"*) + # Python 3.4 support was dropped in pip >= 19.2. + PIP_UPDATE="19.1.1" + break + ;; + esac +done + export DEFAULT_PYTHON_STACK PIP_UPDATE export PY37 PY36 PY35 PY27 PY34