install_pip: don't fail when not installed
On some platforms, "python -m pip" isn't available. Currently this is run undconditionally from the "get_versions" function; remove the call. Change-Id: I91d6c66d055f02fa7b4368593b629933f82d8117
This commit is contained in:
parent
6b9a564622
commit
2df2aa0158
@ -46,15 +46,13 @@ echo "Distro: $DISTRO"
|
||||
function get_versions {
|
||||
# FIXME(dhellmann): Deal with multiple python versions here? This
|
||||
# is just used for reporting, so maybe not?
|
||||
PIP=$(which pip 2>/dev/null || which pip-python 2>/dev/null || true)
|
||||
PIP=$(which pip 2>/dev/null || which pip-python 2>/dev/null || which pip3 2>/dev/null || true)
|
||||
if [[ -n $PIP ]]; then
|
||||
PIP_VERSION=$($PIP --version | awk '{ print $2}')
|
||||
echo "pip: $PIP_VERSION"
|
||||
else
|
||||
echo "pip: Not Installed"
|
||||
fi
|
||||
# Show python3 module version
|
||||
python${PYTHON3_VERSION} -m pip --version
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user