From 007209ff2144d171d222e88f4fb99b8875a0931e Mon Sep 17 00:00:00 2001 From: Brian Cavagnolo Date: Thu, 18 Feb 2021 08:12:20 -0800 Subject: [PATCH] choose the correct version of get-pip.py python 2 is dying. And support for python 2 has been dropped from the get-pip.py script. This breaks the pypi deploy provider. Fix it by fetching the legacy 2.7 get-pip if the python is v 2. --- lib/dpl/assets/pypi/install | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/dpl/assets/pypi/install b/lib/dpl/assets/pypi/install index 484c46fe7..09c86a00a 100644 --- a/lib/dpl/assets/pypi/install +++ b/lib/dpl/assets/pypi/install @@ -1,4 +1,5 @@ #!/bin/bash if [ -z ${VIRTUAL_ENV+x} ]; then export PIP_USER=yes; fi && -wget -nv -O - https://bootstrap.pypa.io/get-pip.py | python - --no-setuptools --no-wheel && +if [ $(python -c 'import sys; print(sys.version_info[0])') = '2' ]; then export VERSION=2.7/; fi && +wget -nv -O - https://bootstrap.pypa.io/${VERSION}get-pip.py | python - --no-setuptools --no-wheel && pip install --upgrade --ignore-installed %{setuptools_arg} %{twine_arg} %{wheel_arg}