From e261806f96be3c67f5d65c6dd1a15fc73538cacd Mon Sep 17 00:00:00 2001 From: Yamashita Yuu Date: Wed, 27 May 2015 00:06:16 +0900 Subject: [PATCH] Skip installing `setuptools` explicitly with using `ez_setup.py` (yyuu/pyenv#381) It will be done by `get-pip.py` and we don't have to do anything explicitly. --- README.md | 12 ++++++------ bin/pyenv-virtualenv | 4 +--- test/pip.bats | 4 ---- test/pyvenv.bats | 6 ------ test/virtualenv.bats | 12 ------------ 5 files changed, 7 insertions(+), 31 deletions(-) diff --git a/README.md b/README.md index e008133..9c63d20 100644 --- a/README.md +++ b/README.md @@ -146,12 +146,12 @@ You can set certain environment variables to control pyenv-virtualenv. * `VIRTUALENV_VERSION`, if set, forces pyenv-virtualenv to install the desired version of virtualenv. If `virtualenv` has not been installed, pyenv-virtualenv will try to install the given version of virtualenv. -* `EZ_SETUP` and `GET_PIP`, if set and `pyvenv` is preferred over `virtualenv`, - use `ez_setup.py` and `get_pip.py` from the specified location. -* `EZ_SETUP_URL` and `GET_PIP_URL`, if set and `pyvenv` is preferred over - `virtualenv`, download `ez_setup.py` and `get_pip.py` from the specified URL. -* `SETUPTOOLS_VERSION` and `PIP_VERSION`, if set and `pyvenv` is preferred - over `virtualenv`, install the specified version of setuptools and pip. +* `GET_PIP`, if set and `pyvenv` is preferred over `virtualenv`, + use `get_pip.py` from the specified location. +* `GET_PIP_URL`, if set and `pyvenv` is preferred over + `virtualenv`, download `get_pip.py` from the specified URL. +* `PIP_VERSION`, if set and `pyvenv` is preferred + over `virtualenv`, install the specified version of pip. ## Version History diff --git a/bin/pyenv-virtualenv b/bin/pyenv-virtualenv index 400bdcf..c26277c 100755 --- a/bin/pyenv-virtualenv +++ b/bin/pyenv-virtualenv @@ -182,9 +182,7 @@ build_package_get_pip() { } build_package_ensurepip() { - pyenv-exec python -m ensurepip 2>/dev/null|| { - build_package_ez_setup "$@" && build_package_get_pip "$@" - } || return 1 + pyenv-exec python -m ensurepip 2>/dev/null || build_package_get_pip "$@" || return 1 } prepare_requirements() { diff --git a/test/pip.bats b/test/pip.bats index 2fdfed7..909a0f3 100644 --- a/test/pip.bats +++ b/test/pip.bats @@ -52,10 +52,8 @@ OUT stub pyenv-prefix " : echo '${PYENV_ROOT}/versions/${PYENV_VERSION}'" stub pyenv-exec "pyvenv ${PYENV_ROOT}/versions/venv : echo PYENV_VERSION=\${PYENV_VERSION} \"\$@\";mkdir -p \${PYENV_ROOT}/versions/venv/bin" stub pyenv-exec "python -m ensurepip : false" - stub pyenv-exec "python */ez_setup.py : echo PYENV_VERSION=\${PYENV_VERSION} \"\$@\";touch \${PYENV_ROOT}/versions/venv/bin/easy_install" stub pyenv-exec "python */get-pip.py : echo PYENV_VERSION=\${PYENV_VERSION} \"\$@\";touch \${PYENV_ROOT}/versions/venv/bin/pip" stub curl true - stub curl true remove_executable "3.3.5" "virtualenv" create_executable "3.3.5" "pyvenv" @@ -65,8 +63,6 @@ OUT assert_success assert_output <