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
(cherry picked from commit 7b63c5ec9e9aea54024105a6521a754efc9f9983)
Change-Id: I0661f7c6913ba6b3e1d00b30e22740d150bfd060
| ... | ... |
@@ -24,27 +24,7 @@ source $TOP_DIR/functions |
| 24 | 24 |
|
| 25 | 25 |
FILES=$TOP_DIR/files |
| 26 | 26 |
|
| 27 |
-# Handle arguments |
|
| 28 |
- |
|
| 29 |
-INSTALL_PIP_VERSION=${INSTALL_PIP_VERSION:-"1.4.1"}
|
|
| 30 |
-while [[ -n "$1" ]]; do |
|
| 31 |
- case $1 in |
|
| 32 |
- --force) |
|
| 33 |
- FORCE=1 |
|
| 34 |
- ;; |
|
| 35 |
- --pip-version) |
|
| 36 |
- INSTALL_PIP_VERSION="$2" |
|
| 37 |
- shift |
|
| 38 |
- ;; |
|
| 39 |
- --use-get-pip) |
|
| 40 |
- USE_GET_PIP=1; |
|
| 41 |
- ;; |
|
| 42 |
- esac |
|
| 43 |
- shift |
|
| 44 |
-done |
|
| 45 |
- |
|
| 46 |
-PIP_GET_PIP_URL=https://raw.github.com/pypa/pip/master/contrib/get-pip.py |
|
| 47 |
-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 |
|
| 48 | 28 |
|
| 49 | 29 |
GetDistro |
| 50 | 30 |
echo "Distro: $DISTRO" |
| ... | ... |
@@ -69,15 +49,6 @@ function install_get_pip() {
|
| 69 | 69 |
sudo python $FILES/get-pip.py |
| 70 | 70 |
} |
| 71 | 71 |
|
| 72 |
-function install_pip_tarball() {
|
|
| 73 |
- (cd $FILES; \ |
|
| 74 |
- curl -O $PIP_TAR_URL; \ |
|
| 75 |
- tar xvfz pip-$INSTALL_PIP_VERSION.tar.gz 1>/dev/null; \ |
|
| 76 |
- cd pip-$INSTALL_PIP_VERSION; \ |
|
| 77 |
- sudo python setup.py install 1>/dev/null; \ |
|
| 78 |
- ) |
|
| 79 |
-} |
|
| 80 |
- |
|
| 81 | 72 |
# Show starting versions |
| 82 | 73 |
get_versions |
| 83 | 74 |
|
| ... | ... |
@@ -86,10 +57,6 @@ get_versions |
| 86 | 86 |
# Eradicate any and all system packages |
| 87 | 87 |
uninstall_package python-pip |
| 88 | 88 |
|
| 89 |
-if [[ -n "$USE_GET_PIP" ]]; then |
|
| 90 |
- install_get_pip |
|
| 91 |
-else |
|
| 92 |
- install_pip_tarball |
|
| 93 |
-fi |
|
| 89 |
+install_get_pip |
|
| 94 | 90 |
|
| 95 | 91 |
get_versions |