Skip pip mirrors for RHEL
The RHEL6 version of pip doesn't have support for mirrors, so skip asking for them. Change-Id: Iaf2900067bb4b41f88d8fe82ea16b6b53d6bcc60
This commit is contained in:
parent
41f7485250
commit
d67dd87bfb
@ -887,9 +887,18 @@ function pip_install {
|
|||||||
SUDO_PIP="sudo"
|
SUDO_PIP="sudo"
|
||||||
CMD_PIP=$(get_pip_command)
|
CMD_PIP=$(get_pip_command)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ is_fedora && $DISTRO =~ (rhel6) ]]; then
|
||||||
|
# RHEL6 pip by default doesn't have this (was introduced
|
||||||
|
# around 0.8.1 or so)
|
||||||
|
PIP_USE_MIRRORS=${PIP_USE_MIRRORS:-False}
|
||||||
|
else
|
||||||
|
PIP_USE_MIRRORS=${PIP_USE_MIRRORS:-True}
|
||||||
|
fi
|
||||||
if [[ "$PIP_USE_MIRRORS" != "False" ]]; then
|
if [[ "$PIP_USE_MIRRORS" != "False" ]]; then
|
||||||
PIP_MIRROR_OPT="--use-mirrors"
|
PIP_MIRROR_OPT="--use-mirrors"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
$SUDO_PIP PIP_DOWNLOAD_CACHE=${PIP_DOWNLOAD_CACHE:-/var/cache/pip} \
|
$SUDO_PIP PIP_DOWNLOAD_CACHE=${PIP_DOWNLOAD_CACHE:-/var/cache/pip} \
|
||||||
HTTP_PROXY=$http_proxy \
|
HTTP_PROXY=$http_proxy \
|
||||||
HTTPS_PROXY=$https_proxy \
|
HTTPS_PROXY=$https_proxy \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user