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
This commit is contained in:
parent
ea937baee6
commit
7b63c5ec9e
@ -24,28 +24,7 @@ source $TOP_DIR/functions
|
|||||||
|
|
||||||
FILES=$TOP_DIR/files
|
FILES=$TOP_DIR/files
|
||||||
|
|
||||||
# Handle arguments
|
PIP_GET_PIP_URL=https://bootstrap.pypa.io/get-pip.py
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
GetDistro
|
GetDistro
|
||||||
echo "Distro: $DISTRO"
|
echo "Distro: $DISTRO"
|
||||||
@ -70,15 +49,6 @@ function install_get_pip {
|
|||||||
sudo -E python $FILES/get-pip.py
|
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
|
# Show starting versions
|
||||||
get_versions
|
get_versions
|
||||||
@ -88,10 +58,6 @@ get_versions
|
|||||||
# Eradicate any and all system packages
|
# Eradicate any and all system packages
|
||||||
uninstall_package python-pip
|
uninstall_package python-pip
|
||||||
|
|
||||||
if [[ "$USE_GET_PIP" == "1" ]]; then
|
install_get_pip
|
||||||
install_get_pip
|
|
||||||
else
|
|
||||||
install_pip_tarball
|
|
||||||
fi
|
|
||||||
|
|
||||||
get_versions
|
get_versions
|
||||||
|
Loading…
Reference in New Issue
Block a user