Browse code

Merge "Skip pip mirrors for RHEL"

Jenkins authored on 2013/04/24 03:07:09
Showing 1 changed files
... ...
@@ -887,9 +887,18 @@ function pip_install {
887 887
         SUDO_PIP="sudo"
888 888
         CMD_PIP=$(get_pip_command)
889 889
     fi
890
+
891
+    if [[ is_fedora && $DISTRO =~ (rhel6) ]]; then
892
+        # RHEL6 pip by default doesn't have this (was introduced
893
+        # around 0.8.1 or so)
894
+        PIP_USE_MIRRORS=${PIP_USE_MIRRORS:-False}
895
+    else
896
+        PIP_USE_MIRRORS=${PIP_USE_MIRRORS:-True}
897
+    fi
890 898
     if [[ "$PIP_USE_MIRRORS" != "False" ]]; then
891 899
         PIP_MIRROR_OPT="--use-mirrors"
892 900
     fi
901
+
893 902
     $SUDO_PIP PIP_DOWNLOAD_CACHE=${PIP_DOWNLOAD_CACHE:-/var/cache/pip} \
894 903
         HTTP_PROXY=$http_proxy \
895 904
         HTTPS_PROXY=$https_proxy \