Browse code

Merge "Drop PIP_USE_MIRRORS environment variable"

Jenkins authored on 2014/11/13 03:00:54
Showing 1 changed files
... ...
@@ -25,7 +25,6 @@
25 25
 # - ``FILES``
26 26
 # - ``OFFLINE``
27 27
 # - ``PIP_DOWNLOAD_CACHE``
28
-# - ``PIP_USE_MIRRORS``
29 28
 # - ``RECLONE``
30 29
 # - ``REQUIREMENTS_DIR``
31 30
 # - ``STACK_USER``
... ...
@@ -1559,7 +1558,7 @@ function get_python_exec_prefix {
1559 1559
 }
1560 1560
 
1561 1561
 # Wrapper for ``pip install`` to set cache and proxy environment variables
1562
-# Uses globals ``OFFLINE``, ``PIP_DOWNLOAD_CACHE``, ``PIP_USE_MIRRORS``,
1562
+# Uses globals ``OFFLINE``, ``PIP_DOWNLOAD_CACHE``,
1563 1563
 # ``TRACK_DEPENDS``, ``*_proxy``
1564 1564
 # pip_install package [package ...]
1565 1565
 function pip_install {
... ...
@@ -1585,21 +1584,13 @@ function pip_install {
1585 1585
         local sudo_pip="sudo"
1586 1586
     fi
1587 1587
 
1588
-    # Mirror option not needed anymore because pypi has CDN available,
1589
-    # but it's useful in certain circumstances
1590
-    PIP_USE_MIRRORS=${PIP_USE_MIRRORS:-False}
1591
-    local pip_mirror_opt=""
1592
-    if [[ "$PIP_USE_MIRRORS" != "False" ]]; then
1593
-        pip_mirror_opt="--use-mirrors"
1594
-    fi
1595
-
1596 1588
     $xtrace
1597 1589
     $sudo_pip PIP_DOWNLOAD_CACHE=${PIP_DOWNLOAD_CACHE:-/var/cache/pip} \
1598 1590
         http_proxy=$http_proxy \
1599 1591
         https_proxy=$https_proxy \
1600 1592
         no_proxy=$no_proxy \
1601 1593
         $cmd_pip install \
1602
-        $pip_mirror_opt $@
1594
+        $@
1603 1595
 
1604 1596
     INSTALL_TESTONLY_PACKAGES=$(trueorfalse False $INSTALL_TESTONLY_PACKAGES)
1605 1597
     if [[ "$INSTALL_TESTONLY_PACKAGES" == "True" ]]; then
... ...
@@ -1610,7 +1601,7 @@ function pip_install {
1610 1610
                 https_proxy=$https_proxy \
1611 1611
                 no_proxy=$no_proxy \
1612 1612
                 $cmd_pip install \
1613
-                $pip_mirror_opt -r $test_req
1613
+                -r $test_req
1614 1614
         fi
1615 1615
     fi
1616 1616
 }