From 03c4b42c1d6c9ecf751852741b2747305e785cc4 Mon Sep 17 00:00:00 2001 From: Vasileios Karakasis Date: Tue, 25 Jun 2024 23:12:11 +0200 Subject: [PATCH] Update `get-pip.py` url for Python 3.7 --- bootstrap.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/bootstrap.sh b/bootstrap.sh index 7f20b7d18a..f1b2e6b996 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -99,10 +99,13 @@ trap _destroy_venv EXIT py_pkg_prefix=external/$(uname -m) # Install a fresh pip in the current environment -if $python -c 'import sys; sys.exit(sys.version_info[:2] == (3, 6))'; then - get_pip_url="https://bootstrap.pypa.io/get-pip.py" -else +pyver=$(python3 -c 'import sys; print(".".join(str(s) for s in sys.version_info[:2]))') +if [ "$pyver" == "3.6" ]; then get_pip_url="https://bootstrap.pypa.io/pip/3.6/get-pip.py" +elif [ "$pyver" == "3.7" ]; then + get_pip_url="https://bootstrap.pypa.io/pip/3.7/get-pip.py" +else + get_pip_url="https://bootstrap.pypa.io/get-pip.py" fi if ! type "curl" > /dev/null 2>&1; then