add EZ_SETUP_URL and GET_PIP_URL

This commit is contained in:
Yamashita Yuu
2013-06-20 14:50:20 +09:00
parent f0ca1b27d0
commit 384fab86ef
2 changed files with 7 additions and 3 deletions

View File

@@ -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 * `VIRTUALENV_VERSION`, if set, forces pyenv-virtualenv to install desired
version of virtualenv. If the virtualenv has not been installed, version of virtualenv. If the virtualenv has not been installed,
pyenv-virtualenv will try to install the given version of virtualenv. 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. than virtualenv, install specified version of setuptools and pip.

View File

@@ -293,12 +293,14 @@ if [ ! -e "${VIRTUALENV_PATH}/bin/python" ]; then
fi fi
if virtualenv_is_pyvenv; then 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 || { 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 || { 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 fi