diff options
| author | Sylvain Herlédan <sylvain.herledan@hrafnagud.info> | 2021-01-25 00:57:35 +0100 |
|---|---|---|
| committer | Sylvain Herlédan <sylvain.herledan@hrafnagud.info> | 2021-01-25 00:57:35 +0100 |
| commit | ab5461d33e354cd604c4193353a97d48f1f0f753 (patch) | |
| tree | 1ad20333cec18a77638670a528ba93911a05c28c /python_install.sh | |
| parent | bb1fce0bea0d1dd88762b38ddcf68722e6ba9e7c (diff) | |
| download | admin_toolbox-ab5461d33e354cd604c4193353a97d48f1f0f753.tar.gz admin_toolbox-ab5461d33e354cd604c4193353a97d48f1f0f753.tar.bz2 admin_toolbox-ab5461d33e354cd604c4193353a97d48f1f0f753.zip | |
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.
Diffstat (limited to 'python_install.sh')
| -rwxr-xr-x | python_install.sh | 11 |
1 files changed, 6 insertions, 5 deletions
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" |
