mirror of
https://github.com/pyenv/pyenv-virtualenv.git
synced 2025-11-11 04:53:53 -05:00
Merge branch 'unset-pip-require-venv'
This commit is contained in:
@@ -25,6 +25,9 @@ if [ -z "$PYENV_ROOT" ]; then
|
|||||||
PYENV_ROOT="${HOME}/.pyenv"
|
PYENV_ROOT="${HOME}/.pyenv"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
unset PIP_REQUIRE_VENV
|
||||||
|
unset PIP_REQUIRE_VIRTUALENV
|
||||||
|
|
||||||
# Define library functions
|
# Define library functions
|
||||||
parse_options() {
|
parse_options() {
|
||||||
OPTIONS=()
|
OPTIONS=()
|
||||||
|
|||||||
@@ -97,6 +97,27 @@ rehashed
|
|||||||
OUT
|
OUT
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@test "install virtualenv with unsetting troublesome pip options" {
|
||||||
|
stub_pyenv "3.2.1"
|
||||||
|
stub pyenv-which "virtualenv : false" \
|
||||||
|
"pyvenv : false"
|
||||||
|
stub pyenv-exec "echo PIP_REQUIRE_VENV=\${PIP_REQUIRE_VENV} PYENV_VERSION=\${PYENV_VERSION} \"\$@\"" \
|
||||||
|
"echo PIP_REQUIRE_VENV=\${PIP_REQUIRE_VENV} PYENV_VERSION=\${PYENV_VERSION} \"\$@\""
|
||||||
|
|
||||||
|
PIP_REQUIRE_VENV="true" run pyenv-virtualenv venv
|
||||||
|
|
||||||
|
unstub_pyenv
|
||||||
|
unstub pyenv-which
|
||||||
|
unstub pyenv-exec
|
||||||
|
|
||||||
|
assert_success
|
||||||
|
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
|
||||||
|
rehashed
|
||||||
|
OUT
|
||||||
|
}
|
||||||
|
|
||||||
@test "install pip without using ensurepip" {
|
@test "install pip without using ensurepip" {
|
||||||
stub_pyenv "3.3.0"
|
stub_pyenv "3.3.0"
|
||||||
stub pyenv-which "virtualenv : false" \
|
stub pyenv-which "virtualenv : false" \
|
||||||
|
|||||||
Reference in New Issue
Block a user