Fix reinstalling in rally install script

Try to uninstall before installing rally
Also wipe all .pyc/.pyo files before installing

Change-Id: I693a12d19aea7c9a9d850796f95fed6c315bfa61
Closes-Bug: 1456693
This commit is contained in:
Sergey Skripnick 2015-05-29 17:09:58 +03:00 committed by Andrey Kurilin
parent 1c761cfbb4
commit 3f3e3fb40a

View File

@ -661,6 +661,12 @@ BASEDIR=$(dirname "$(readlink -e "$0")")
if [ -d "$BASEDIR"/.git ]
then
SOURCEDIR=$BASEDIR
if find . -regex '.+\.py[co]$' -delete
then
echo "Wiped python compiled files."
else
echo "Warning! Unable to wipe python compiled files"
fi
else
if [ "$USEVIRTUALENV" = 'yes' ]
then
@ -707,6 +713,8 @@ install_db_connector
cd "$SOURCEDIR"
# Install dependencies
pip install -i $BASE_PIP_URL pbr 'tox<=1.6.1'
# Uninstall possible previous version
pip uninstall -y rally || true
# Install rally
pip install -i $BASE_PIP_URL .
cd "$ORIG_WD"