Export PYTHON_VERSION

This is the '{MAJOR}.{MAJOR}' version number. Two incorrect usages of
the 'python_version' function are replaced.

Change-Id: I5770594a680268f8757d853a624cd5e1e545bd26
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
This commit is contained in:
Stephen Finucane
2018-01-18 15:26:59 +00:00
parent 651a7336ad
commit 6f7a90ff7c
3 changed files with 4 additions and 2 deletions

View File

@@ -179,7 +179,7 @@ function _config_keystone_apache_wsgi {
keystone_auth_port=$KEYSTONE_AUTH_PORT_INT keystone_auth_port=$KEYSTONE_AUTH_PORT_INT
fi fi
if [[ ${USE_VENV} = True ]]; then if [[ ${USE_VENV} = True ]]; then
venv_path="python-path=${PROJECT_VENV["keystone"]}/lib/$(python_version)/site-packages" venv_path="python-path=${PROJECT_VENV["keystone"]}/lib/${PYTHON_VERSION}/site-packages"
fi fi
sudo cp $FILES/apache-keystone.template $keystone_apache_conf sudo cp $FILES/apache-keystone.template $keystone_apache_conf

View File

@@ -85,7 +85,7 @@ function _config_placement_apache_wsgi {
# reuse nova's venv if there is one as placement code lives # reuse nova's venv if there is one as placement code lives
# there # there
if [[ ${USE_VENV} = True ]]; then if [[ ${USE_VENV} = True ]]; then
venv_path="python-path=${PROJECT_VENV["nova"]}/lib/$(python_version)/site-packages" venv_path="python-path=${PROJECT_VENV["nova"]}/lib/${PYTHON_VERSION}/site-packages"
nova_bin_dir=${PROJECT_VENV["nova"]}/bin nova_bin_dir=${PROJECT_VENV["nova"]}/bin
fi fi

View File

@@ -84,8 +84,10 @@ fi
if python3_enabled; then if python3_enabled; then
install_python3 install_python3
export PYTHON=$(which python${PYTHON3_VERSION} 2>/dev/null || which python3 2>/dev/null) export PYTHON=$(which python${PYTHON3_VERSION} 2>/dev/null || which python3 2>/dev/null)
export PYTHON_VERSION="$PYTHON3_VERSION"
else else
export PYTHON=$(which python 2>/dev/null) export PYTHON=$(which python 2>/dev/null)
export PYTHON_VERSION="$PYTHON2_VERSION"
fi fi
# Mark end of run # Mark end of run