Simple pip install fails for python3

uses: new python preferred method of calling the pip module directly
attempts: to clean up (by invitation) an attempt at this by dims
When USE_PYTHON3 is specified, run the pip module for aodh installation
from the correct python version, as shown in the documentation since
python3.4 (it works with all current versions of python2 and python3).
https://docs.python.org/3.4/installing/#basic-usage

Change-Id: I02090077781bc335a0df4dc54ff37edece281210
This commit is contained in:
Yarko Tymciurak 2017-01-06 15:43:23 -06:00
parent 50982ad11e
commit 57e79667d9

View File

@ -248,11 +248,11 @@ function install_aodh {
_aodh_prepare_coordination
install_aodhclient
if python3_enabled; then
PIP=$(which pip 2>/dev/null || which pip-python 2>/dev/null)
sudo -H python${PYTHON3_VERSION} $PIP install -e "$AODH_DIR"[test,$AODH_BACKEND]
PY_VERS=${PYTHON3_VERSION}
else
sudo -H pip install -e "$AODH_DIR"[test,$AODH_BACKEND]
PY_VERS=${PYTHON2_VERSION}
fi
sudo -H python${PY_VERS} -m pip install -e "$AODH_DIR"[test,$AODH_BACKEND]
sudo install -d -o $STACK_USER -m 755 $AODH_CONF_DIR
if [ "$AODH_DEPLOY" == "mod_wsgi" ]; then