Merge "Depreciated pip option PIP_DOWNLOAD_CACHE removal"

This commit is contained in:
Jenkins 2015-01-13 23:05:46 +00:00 committed by Gerrit Code Review
commit b31f4cc3e5

View File

@ -26,7 +26,6 @@
# - ``ERROR_ON_CLONE`` # - ``ERROR_ON_CLONE``
# - ``FILES`` # - ``FILES``
# - ``OFFLINE`` # - ``OFFLINE``
# - ``PIP_DOWNLOAD_CACHE``
# - ``RECLONE`` # - ``RECLONE``
# - ``REQUIREMENTS_DIR`` # - ``REQUIREMENTS_DIR``
# - ``STACK_USER`` # - ``STACK_USER``
@ -1568,8 +1567,7 @@ function get_python_exec_prefix {
} }
# Wrapper for ``pip install`` to set cache and proxy environment variables # Wrapper for ``pip install`` to set cache and proxy environment variables
# Uses globals ``OFFLINE``, ``PIP_DOWNLOAD_CACHE``, # Uses globals ``OFFLINE``, ``TRACK_DEPENDS``, ``*_proxy``
# ``TRACK_DEPENDS``, ``*_proxy``
# pip_install package [package ...] # pip_install package [package ...]
function pip_install { function pip_install {
local xtrace=$(set +o | grep xtrace) local xtrace=$(set +o | grep xtrace)
@ -1594,8 +1592,15 @@ function pip_install {
local sudo_pip="sudo -H" local sudo_pip="sudo -H"
fi fi
local pip_version=$(python -c "import pip; \
print(pip.__version__.strip('.')[0])")
if (( pip_version<6 )); then
die $LINENO "Currently installed pip version ${pip_version} does not" \
"meet minimum requirements (>=6)."
fi
$xtrace $xtrace
$sudo_pip PIP_DOWNLOAD_CACHE=${PIP_DOWNLOAD_CACHE:-/var/cache/pip} \ $sudo_pip \
http_proxy=$http_proxy \ http_proxy=$http_proxy \
https_proxy=$https_proxy \ https_proxy=$https_proxy \
no_proxy=$no_proxy \ no_proxy=$no_proxy \
@ -1606,7 +1611,7 @@ function pip_install {
if [[ "$INSTALL_TESTONLY_PACKAGES" == "True" ]]; then if [[ "$INSTALL_TESTONLY_PACKAGES" == "True" ]]; then
local test_req="$@/test-requirements.txt" local test_req="$@/test-requirements.txt"
if [[ -e "$test_req" ]]; then if [[ -e "$test_req" ]]; then
$sudo_pip PIP_DOWNLOAD_CACHE=${PIP_DOWNLOAD_CACHE:-/var/cache/pip} \ $sudo_pip \
http_proxy=$http_proxy \ http_proxy=$http_proxy \
https_proxy=$https_proxy \ https_proxy=$https_proxy \
no_proxy=$no_proxy \ no_proxy=$no_proxy \