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
diff --git a/tools/install_pip.sh b/tools/install_pip.sh
index 1eb9e7a..d3f5e78 100755
--- a/tools/install_pip.sh
+++ b/tools/install_pip.sh
@@ -24,28 +24,7 @@
FILES=$TOP_DIR/files
-# Handle arguments
-
-USE_GET_PIP=${USE_GET_PIP:-0}
-INSTALL_PIP_VERSION=${INSTALL_PIP_VERSION:-"1.4.1"}
-while [[ -n "$1" ]]; do
- case $1 in
- --force)
- FORCE=1
- ;;
- --pip-version)
- INSTALL_PIP_VERSION="$2"
- shift
- ;;
- --use-get-pip)
- USE_GET_PIP=1;
- ;;
- esac
- shift
-done
-
-PIP_GET_PIP_URL=https://raw.github.com/pypa/pip/master/contrib/get-pip.py
-PIP_TAR_URL=https://pypi.python.org/packages/source/p/pip/pip-$INSTALL_PIP_VERSION.tar.gz
+PIP_GET_PIP_URL=https://bootstrap.pypa.io/get-pip.py
GetDistro
echo "Distro: $DISTRO"
@@ -70,15 +49,6 @@
sudo -E python $FILES/get-pip.py
}
-function install_pip_tarball {
- if [[ ! -r $FILES/pip-$INSTALL_PIP_VERSION.tar.gz ]]; then
- (cd $FILES; \
- curl -O $PIP_TAR_URL; \
- tar xvfz pip-$INSTALL_PIP_VERSION.tar.gz 1>/dev/null)
- fi
- (cd $FILES/pip-$INSTALL_PIP_VERSION; \
- sudo -E python setup.py install 1>/dev/null)
-}
# Show starting versions
get_versions
@@ -88,10 +58,6 @@
# Eradicate any and all system packages
uninstall_package python-pip
-if [[ "$USE_GET_PIP" == "1" ]]; then
- install_get_pip
-else
- install_pip_tarball
-fi
+install_get_pip
get_versions