From ab5461d33e354cd604c4193353a97d48f1f0f753 Mon Sep 17 00:00:00 2001 From: Sylvain Herlédan Date: Mon, 25 Jan 2021 00:57:35 +0100 Subject: Pip dropped support for Python 2.x and 3.5, get bootstrap script that is specific to these Python versions instead of the generic one when necessary. --- python_install.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'python_install.sh') diff --git a/python_install.sh b/python_install.sh index 3abcf55..543002f 100755 --- a/python_install.sh +++ b/python_install.sh @@ -57,13 +57,14 @@ pip_install_method() { local python="${1}"; shift; local env_dir="${1}"; shift; - local num="${1}"; shift; + local version="${1:-}"; shift; local opts=''; - wget 'https://bootstrap.pypa.io/get-pip.py' \ + [ -n "${version}" ] && version="/${version}" + wget "https://bootstrap.pypa.io${version}/get-pip.py" \ -O "${PIP_INSTALL_SCRIPT}" "${python}" "${PIP_INSTALL_SCRIPT}" --isolated \ - --prefix=${env_dir} \ + --prefix="${env_dir}" \ --ignore-installed \ --no-cache @@ -94,12 +95,12 @@ install_environment() then venv_install_method "${python}" "${env_dir}" else - pip_install_method "${python}" "${env_dir}" "${num}" + pip_install_method "${python}" "${env_dir}" "${major}.${minor}" install_virtualenv "${python}" "${env_dir}" fi elif [ ${num} -eq 27 ]; then - pip_install_method "${python}" "${env_dir}" "${num}" + pip_install_method "${python}" "${env_dir}" "${major}.${minor}" install_virtualenv "${python}" "${env_dir}" else >&2 echo "Unsupported Python version" -- cgit v1.2.3-70-g09d2