mirror of
https://github.com/pyenv/pyenv-virtualenv.git
synced 2025-11-08 11:33:55 -05:00
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.
This commit is contained in:
12
README.md
12
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
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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 <<OUT
|
||||
PYENV_VERSION=3.3.5 pyvenv ${PYENV_ROOT}/versions/venv
|
||||
Installing setuptools from https://bootstrap.pypa.io/ez_setup.py...
|
||||
PYENV_VERSION=venv python ${TMP}/pyenv/cache/ez_setup.py
|
||||
Installing pip from https://bootstrap.pypa.io/get-pip.py...
|
||||
PYENV_VERSION=venv python ${TMP}/pyenv/cache/get-pip.py
|
||||
rehashed
|
||||
|
||||
@@ -74,10 +74,8 @@ OUT
|
||||
stub pyenv-exec "pip install virtualenv : echo PYENV_VERSION=\${PYENV_VERSION} \"\$@\""
|
||||
stub pyenv-exec "virtualenv ${PYENV_ROOT}/versions/venv : echo PYENV_VERSION=\${PYENV_VERSION} \"\$@\""
|
||||
stub pyenv-exec "python -m ensurepip : false"
|
||||
stub pyenv-exec "python */ez_setup.py : true"
|
||||
stub pyenv-exec "python */get-pip.py : true"
|
||||
stub curl true
|
||||
stub curl true
|
||||
|
||||
remove_executable "3.2.1" "virtualenv"
|
||||
remove_executable "3.2.1" "pyvenv"
|
||||
@@ -88,7 +86,6 @@ OUT
|
||||
assert_output <<OUT
|
||||
PYENV_VERSION=3.2.1 pip install virtualenv
|
||||
PYENV_VERSION=3.2.1 virtualenv ${PYENV_ROOT}/versions/venv
|
||||
Installing setuptools from https://bootstrap.pypa.io/ez_setup.py...
|
||||
Installing pip from https://bootstrap.pypa.io/get-pip.py...
|
||||
rehashed
|
||||
OUT
|
||||
@@ -156,10 +153,8 @@ OUT
|
||||
stub pyenv-exec "pip install virtualenv : echo PIP_REQUIRE_VENV=\${PIP_REQUIRE_VENV} PYENV_VERSION=\${PYENV_VERSION} \"\$@\""
|
||||
stub pyenv-exec "virtualenv ${PYENV_ROOT}/versions/venv : echo PIP_REQUIRE_VENV=\${PIP_REQUIRE_VENV} PYENV_VERSION=\${PYENV_VERSION} \"\$@\""
|
||||
stub pyenv-exec "python -m ensurepip : false"
|
||||
stub pyenv-exec "python */ez_setup.py : true"
|
||||
stub pyenv-exec "python */get-pip.py : true"
|
||||
stub curl true
|
||||
stub curl true
|
||||
|
||||
remove_executable "3.2.1" "virtualenv"
|
||||
remove_executable "3.2.1" "pyvenv"
|
||||
@@ -170,7 +165,6 @@ OUT
|
||||
assert_output <<OUT
|
||||
PIP_REQUIRE_VENV= PYENV_VERSION=3.2.1 pip install virtualenv
|
||||
PIP_REQUIRE_VENV= PYENV_VERSION=3.2.1 virtualenv ${PYENV_ROOT}/versions/venv
|
||||
Installing setuptools from https://bootstrap.pypa.io/ez_setup.py...
|
||||
Installing pip from https://bootstrap.pypa.io/get-pip.py...
|
||||
rehashed
|
||||
OUT
|
||||
|
||||
@@ -28,17 +28,14 @@ unstub_pyenv() {
|
||||
stub_pyenv "${PYENV_VERSION}"
|
||||
stub pyenv-exec "virtualenv ${PYENV_ROOT}/versions/venv : echo PYENV_VERSION=\${PYENV_VERSION} \"\$@\""
|
||||
stub pyenv-exec "python -m ensurepip : false"
|
||||
stub pyenv-exec "python */ez_setup.py : true"
|
||||
stub pyenv-exec "python */get-pip.py : true"
|
||||
stub curl true
|
||||
stub curl true
|
||||
|
||||
run pyenv-virtualenv "3.2.1" "venv"
|
||||
|
||||
assert_success
|
||||
assert_output <<OUT
|
||||
PYENV_VERSION=3.2.1 virtualenv ${PYENV_ROOT}/versions/venv
|
||||
Installing setuptools from https://bootstrap.pypa.io/ez_setup.py...
|
||||
Installing pip from https://bootstrap.pypa.io/get-pip.py...
|
||||
rehashed
|
||||
OUT
|
||||
@@ -54,17 +51,14 @@ OUT
|
||||
stub pyenv-version-name "echo \${PYENV_VERSION}"
|
||||
stub pyenv-exec "virtualenv ${PYENV_ROOT}/versions/venv : echo PYENV_VERSION=\${PYENV_VERSION} \"\$@\""
|
||||
stub pyenv-exec "python -m ensurepip : false"
|
||||
stub pyenv-exec "python */ez_setup.py : true"
|
||||
stub pyenv-exec "python */get-pip.py : true"
|
||||
stub curl true
|
||||
stub curl true
|
||||
|
||||
run pyenv-virtualenv venv
|
||||
|
||||
assert_success
|
||||
assert_output <<OUT
|
||||
PYENV_VERSION=3.2.1 virtualenv ${PYENV_ROOT}/versions/venv
|
||||
Installing setuptools from https://bootstrap.pypa.io/ez_setup.py...
|
||||
Installing pip from https://bootstrap.pypa.io/get-pip.py...
|
||||
rehashed
|
||||
OUT
|
||||
@@ -81,17 +75,14 @@ OUT
|
||||
stub pyenv-version-name "echo \${PYENV_VERSION}"
|
||||
stub pyenv-exec "virtualenv --verbose --python=python ${PYENV_ROOT}/versions/venv : echo PYENV_VERSION=\${PYENV_VERSION} \"\$@\""
|
||||
stub pyenv-exec "python -m ensurepip : false"
|
||||
stub pyenv-exec "python */ez_setup.py : true"
|
||||
stub pyenv-exec "python */get-pip.py : true"
|
||||
stub curl true
|
||||
stub curl true
|
||||
|
||||
run pyenv-virtualenv -v -p python venv
|
||||
|
||||
assert_success
|
||||
assert_output <<OUT
|
||||
PYENV_VERSION=3.2.1 virtualenv --verbose --python=python ${PYENV_ROOT}/versions/venv
|
||||
Installing setuptools from https://bootstrap.pypa.io/ez_setup.py...
|
||||
Installing pip from https://bootstrap.pypa.io/get-pip.py...
|
||||
rehashed
|
||||
OUT
|
||||
@@ -108,17 +99,14 @@ OUT
|
||||
stub pyenv-version-name "echo \${PYENV_VERSION}"
|
||||
stub pyenv-exec "virtualenv --verbose --python=python ${PYENV_ROOT}/versions/venv : echo PYENV_VERSION=\${PYENV_VERSION} \"\$@\""
|
||||
stub pyenv-exec "python -m ensurepip : false"
|
||||
stub pyenv-exec "python */ez_setup.py : true"
|
||||
stub pyenv-exec "python */get-pip.py : true"
|
||||
stub curl true
|
||||
stub curl true
|
||||
|
||||
run pyenv-virtualenv --verbose --python=python venv
|
||||
|
||||
assert_success
|
||||
assert_output <<OUT
|
||||
PYENV_VERSION=3.2.1 virtualenv --verbose --python=python ${PYENV_ROOT}/versions/venv
|
||||
Installing setuptools from https://bootstrap.pypa.io/ez_setup.py...
|
||||
Installing pip from https://bootstrap.pypa.io/get-pip.py...
|
||||
rehashed
|
||||
OUT
|
||||
|
||||
Reference in New Issue
Block a user