renamed virtualenv() to venv()

This commit is contained in:
Yamashita Yuu
2013-06-20 14:56:24 +09:00
parent 384fab86ef
commit f3c5a64281

View File

@@ -100,14 +100,14 @@ http_get_wget() {
} }
version() { version() {
local version="$(virtualenv --version 2>/dev/null || true)" local version="$(venv --version 2>/dev/null || true)"
echo "pyenv-virtualenv ${PYENV_VIRTUALENV_VERSION} (virtualenv ${version:-unknown})" echo "pyenv-virtualenv ${PYENV_VIRTUALENV_VERSION} (virtualenv ${version:-unknown})"
} }
usage() { usage() {
# We can remove the sed fallback once pyenv 0.2.0 is widely available. # We can remove the sed fallback once pyenv 0.2.0 is widely available.
pyenv-help virtualenv 2>/dev/null || sed -ne '/^#/!q;s/.//;s/.//;1,4d;p' < "$0" pyenv-help virtualenv 2>/dev/null || sed -ne '/^#/!q;s/.//;s/.//;1,4d;p' < "$0"
virtualenv --help 2>/dev/null || true venv --help 2>/dev/null || true
[ -z "$1" ] || exit "$1" [ -z "$1" ] || exit "$1"
} }
@@ -120,7 +120,7 @@ virtualenv_is_pyvenv() {
fi fi
} }
virtualenv() { venv() {
if virtualenv_is_pyvenv; then if virtualenv_is_pyvenv; then
pyenv-exec pyvenv "$@" pyenv-exec pyvenv "$@"
else else
@@ -281,7 +281,7 @@ STATUS=0
# change to cache directory to reuse them between invocation. # change to cache directory to reuse them between invocation.
mkdir -p "${PYENV_VIRTUALENV_CACHE_PATH}" mkdir -p "${PYENV_VIRTUALENV_CACHE_PATH}"
cd "${PYENV_VIRTUALENV_CACHE_PATH}" cd "${PYENV_VIRTUALENV_CACHE_PATH}"
virtualenv $QUIET $VERBOSE "${VIRTUALENV_OPTIONS[@]}" "${VIRTUALENV_PATH}" || STATUS="$?" venv $QUIET $VERBOSE "${VIRTUALENV_OPTIONS[@]}" "${VIRTUALENV_PATH}" || STATUS="$?"
# Create symlink of `python' bound for actual executable # Create symlink of `python' bound for actual executable
# TODO: remove this if virtualenv doesn't really need this # TODO: remove this if virtualenv doesn't really need this