Browse code

be opinionated: only use get-pip.py

get-pip.py is now on a CDN, and is the prefered way to get pip.

Remove the default path of using pip tarballs from pypi and use
get-pip.py on from here on.

Closes-Bug: #1326539

Change-Id: I0661f7c6913ba6b3e1d00b30e22740d150bfd060
(cherry picked from commit 7b63c5ec9e9aea54024105a6521a754efc9f9983)

Sean Dague authored on 2014/06/05 05:25:52
Showing 1 changed files
... ...
@@ -24,28 +24,7 @@ source $TOP_DIR/functions
24 24
 
25 25
 FILES=$TOP_DIR/files
26 26
 
27
-# Handle arguments
28
-
29
-USE_GET_PIP=${USE_GET_PIP:-0}
30
-INSTALL_PIP_VERSION=${INSTALL_PIP_VERSION:-"1.4.1"}
31
-while [[ -n "$1" ]]; do
32
-    case $1 in
33
-        --force)
34
-            FORCE=1
35
-            ;;
36
-        --pip-version)
37
-            INSTALL_PIP_VERSION="$2"
38
-            shift
39
-            ;;
40
-        --use-get-pip)
41
-            USE_GET_PIP=1;
42
-            ;;
43
-    esac
44
-    shift
45
-done
46
-
47
-PIP_GET_PIP_URL=https://raw.github.com/pypa/pip/master/contrib/get-pip.py
48
-PIP_TAR_URL=https://pypi.python.org/packages/source/p/pip/pip-$INSTALL_PIP_VERSION.tar.gz
27
+PIP_GET_PIP_URL=https://bootstrap.pypa.io/get-pip.py
49 28
 
50 29
 GetDistro
51 30
 echo "Distro: $DISTRO"
... ...
@@ -70,15 +49,6 @@ function install_get_pip {
70 70
     sudo -E python $FILES/get-pip.py
71 71
 }
72 72
 
73
-function install_pip_tarball {
74
-    if [[ ! -r $FILES/pip-$INSTALL_PIP_VERSION.tar.gz ]]; then
75
-        (cd $FILES; \
76
-            curl -O $PIP_TAR_URL; \
77
-            tar xvfz pip-$INSTALL_PIP_VERSION.tar.gz 1>/dev/null)
78
-    fi
79
-    (cd $FILES/pip-$INSTALL_PIP_VERSION; \
80
-        sudo -E python setup.py install 1>/dev/null)
81
-}
82 73
 
83 74
 # Show starting versions
84 75
 get_versions
... ...
@@ -88,10 +58,6 @@ get_versions
88 88
 # Eradicate any and all system packages
89 89
 uninstall_package python-pip
90 90
 
91
-if [[ "$USE_GET_PIP" == "1" ]]; then
92
-    install_get_pip
93
-else
94
-    install_pip_tarball
95
-fi
91
+install_get_pip
96 92
 
97 93
 get_versions