DIB: relax check on pip executable

On a devstack, pip can be installed system-wide but not coming from
system packages. So instead of checking python-pip package installation,
we only check that "which pip" succeeds

Change-Id: If8a1b7b4b7336cab0bef755b90924e03f1497b82
This commit is contained in:
Bernard Cafarelli 2016-08-18 17:23:00 +02:00
parent d30d18656e
commit 52e32ed8d8

View File

@ -254,7 +254,7 @@ if [ "$platform" = 'NAME="Ubuntu"' ]; then
fi fi
elif [ "$platform" = 'NAME=Fedora' ]; then elif [ "$platform" = 'NAME=Fedora' ]; then
PKG_LIST="qemu kpartx git python-pip" PKG_LIST="qemu kpartx git"
for pkg in $PKG_LIST; do for pkg in $PKG_LIST; do
if ! yum list installed $pkg &> /dev/null; then if ! yum list installed $pkg &> /dev/null; then
echo "Required package " $pkg " is not installed. Exiting." echo "Required package " $pkg " is not installed. Exiting."
@ -263,7 +263,7 @@ elif [ "$platform" = 'NAME=Fedora' ]; then
done done
else else
# centos or rhel # centos or rhel
PKG_LIST="qemu-kvm qemu-img kpartx git python-pip" PKG_LIST="qemu-kvm qemu-img kpartx git"
for pkg in $PKG_LIST; do for pkg in $PKG_LIST; do
if ! yum list installed $pkg &> /dev/null; then if ! yum list installed $pkg &> /dev/null; then
echo "Required package " $pkg " is not installed. Exiting." echo "Required package " $pkg " is not installed. Exiting."
@ -282,6 +282,13 @@ else
fi fi
fi fi
# pip may not be installed from package managers
# only check that we find an executable
if ! which pip &> /dev/null; then
echo "Required executable pip not found. Exiting."
exit 1
fi
# "pip freeze" does not show argparse, even if it is explicitly installed, # "pip freeze" does not show argparse, even if it is explicitly installed,
# because it is part of the standard python library in 2.7. # because it is part of the standard python library in 2.7.
# See https://github.com/pypa/pip/issues/1570 # See https://github.com/pypa/pip/issues/1570