mirror of
https://github.com/pyenv/pyenv-virtualenv.git
synced 2025-11-10 20:43:55 -05:00
add EZ_SETUP_URL and GET_PIP_URL
This commit is contained in:
@@ -65,7 +65,9 @@ You can set certain environment variables to control the pyenv-virtualenv.
|
||||
* `VIRTUALENV_VERSION`, if set, forces pyenv-virtualenv to install desired
|
||||
version of virtualenv. If the virtualenv has not been installed,
|
||||
pyenv-virtualenv will try to install the given version of virtualenv.
|
||||
* `SETUPTOOLS_VERSION` and `PIP_VERSION`, if set and if pyvenv is preferred
|
||||
* `EZ_SETUP_URL` and `GET_PIP_URL`, if set and pyvenv is preferred
|
||||
than virtualenv, download `ez_setup.py` and `get_pip.py` from specified URL.
|
||||
* `SETUPTOOLS_VERSION` and `PIP_VERSION`, if set and pyvenv is preferred
|
||||
than virtualenv, install specified version of setuptools and pip.
|
||||
|
||||
|
||||
|
||||
@@ -293,12 +293,14 @@ if [ ! -e "${VIRTUALENV_PATH}/bin/python" ]; then
|
||||
fi
|
||||
|
||||
if virtualenv_is_pyvenv; then
|
||||
[ -n "${EZ_SETUP_URL}" ] || EZ_SETUP_URL="https://bitbucket.org/pypa/setuptools/raw/${SETUPTOOLS_VERSION:-0.7.4}/ez_setup.py"
|
||||
PYENV_VERSION="${VIRTUALENV_NAME}" pyenv-exec python -c 'import setuptools' 1>/dev/null 2>&1 || {
|
||||
http get "https://bitbucket.org/pypa/setuptools/raw/${SETUPTOOLS_VERSION:-0.7.4}/ez_setup.py" | PYENV_VERSION="${VIRTUALENV_NAME}" pyenv-exec python
|
||||
http get "${EZ_SETUP_URL}" | PYENV_VERSION="${VIRTUALENV_NAME}" pyenv-exec python
|
||||
}
|
||||
|
||||
[ -n "${GET_PIP_URL}" ] || GET_PIP_URL="https://raw.github.com/pypa/pip/${PIP_VERSION:-master}/contrib/get-pip.py"
|
||||
PYENV_VERSION="${VIRTUALENV_NAME}" pyenv-which pip 1>/dev/null 2>&1 || {
|
||||
http get "https://raw.github.com/pypa/pip/${PIP_VERSION:-master}/contrib/get-pip.py" | PYENV_VERSION="${VIRTUALENV_NAME}" pyenv-exec python
|
||||
http get "${GET_PIP_URL}" | PYENV_VERSION="${VIRTUALENV_NAME}" pyenv-exec python
|
||||
}
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user