From 7b63c5ec9e9aea54024105a6521a754efc9f9983 Mon Sep 17 00:00:00 2001 From: Sean Dague Date: Wed, 4 Jun 2014 16:25:52 -0400 Subject: [PATCH] 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 --- tools/install_pip.sh | 38 ++------------------------------------ 1 file changed, 2 insertions(+), 36 deletions(-) diff --git a/tools/install_pip.sh b/tools/install_pip.sh index 1eb9e7a3f5..d3f5e78a06 100755 --- a/tools/install_pip.sh +++ b/tools/install_pip.sh @@ -24,28 +24,7 @@ source $TOP_DIR/functions 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 @@ function install_get_pip { 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 @@ get_versions # 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