mirror of
https://github.com/pyenv/pyenv-virtualenv.git
synced 2025-11-14 14:33:52 -05:00
Refactoring around SETUPTOOLS_VERSION and PIP_VERSION
This commit is contained in:
@@ -158,13 +158,7 @@ install_setuptools() {
|
|||||||
fi
|
fi
|
||||||
cat "${EZ_SETUP}"
|
cat "${EZ_SETUP}"
|
||||||
else
|
else
|
||||||
[ -n "${EZ_SETUP_URL}" ] || {
|
[ -n "${EZ_SETUP_URL}" ] || EZ_SETUP_URL="https://bootstrap.pypa.io/ez_setup.py"
|
||||||
if [ -n "${SETUPTOOLS_VERSION}" ]; then
|
|
||||||
EZ_SETUP_URL="https://bitbucket.org/pypa/setuptools/raw/${SETUPTOOLS_VERSION}/ez_setup.py"
|
|
||||||
else
|
|
||||||
EZ_SETUP_URL="https://bootstrap.pypa.io/ez_setup.py"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
if [ -n "$VERBOSE" ]; then
|
if [ -n "$VERBOSE" ]; then
|
||||||
echo "Installing setuptools from ${EZ_SETUP_URL}..." 1>&2
|
echo "Installing setuptools from ${EZ_SETUP_URL}..." 1>&2
|
||||||
fi
|
fi
|
||||||
@@ -181,13 +175,7 @@ install_pip() {
|
|||||||
fi
|
fi
|
||||||
cat "${GET_PIP}"
|
cat "${GET_PIP}"
|
||||||
else
|
else
|
||||||
[ -n "${GET_PIP_URL}" ] || {
|
[ -n "${GET_PIP_URL}" ] || GET_PIP_URL="https://bootstrap.pypa.io/get-pip.py"
|
||||||
if [ -n "${PIP_VERSION}" ]; then
|
|
||||||
GET_PIP_URL="https://raw.githubusercontent.com/pypa/pip/${PIP_VERSION}/contrib/get-pip.py"
|
|
||||||
else
|
|
||||||
GET_PIP_URL="https://bootstrap.pypa.io/get-pip.py"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
if [ -n "$VERBOSE" ]; then
|
if [ -n "$VERBOSE" ]; then
|
||||||
echo "Installing pip from ${GET_PIP_URL}..." 1>&2
|
echo "Installing pip from ${GET_PIP_URL}..." 1>&2
|
||||||
fi
|
fi
|
||||||
@@ -372,6 +360,15 @@ fi
|
|||||||
unset VIRTUALENV_VERSION
|
unset VIRTUALENV_VERSION
|
||||||
|
|
||||||
|
|
||||||
|
# Download specified version of ez_setup.py/get-pip.py
|
||||||
|
if [ -n "${SETUPTOOLS_VERSION}" ]; then
|
||||||
|
EZ_SETUP_URL="https://bitbucket.org/pypa/setuptools/raw/${SETUPTOOLS_VERSION}/ez_setup.py"
|
||||||
|
fi
|
||||||
|
if [ -n "${PIP_VERSION}" ]; then
|
||||||
|
GET_PIP_URL="https://raw.githubusercontent.com/pypa/pip/${PIP_VERSION}/contrib/get-pip.py"
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
# Define `before_virtualenv` and `after_virtualenv` functions that allow
|
# Define `before_virtualenv` and `after_virtualenv` functions that allow
|
||||||
# plugin hooks to register a string of code for execution before or
|
# plugin hooks to register a string of code for execution before or
|
||||||
# after the installation process.
|
# after the installation process.
|
||||||
|
|||||||
Reference in New Issue
Block a user