Introduce a PYTHON env var
* $PYTHON will have the path to python runtime to be used
* Use $PYTHON to run all the scripts
Change-Id: Ib5ab7820fc18cae5e50ea47302b610494197ad47
diff --git a/lib/horizon b/lib/horizon
index 4cabbe4..9c7ec00 100644
--- a/lib/horizon
+++ b/lib/horizon
@@ -81,11 +81,7 @@
# Horizon is installed as develop mode, so we can compile here.
# Message catalog compilation is handled by Django admin script,
# so compiling them after the installation avoids Django installation twice.
- if python3_enabled; then
- (cd $HORIZON_DIR; python${PYTHON3_VERSION} manage.py compilemessages)
- else
- (cd $HORIZON_DIR; python manage.py compilemessages)
- fi
+ (cd $HORIZON_DIR; $PYTHON manage.py compilemessages)
# ``local_settings.py`` is used to override horizon default settings.
local local_settings=$HORIZON_DIR/openstack_dashboard/local/local_settings.py
@@ -166,11 +162,7 @@
git_clone_by_name "django_openstack_auth"
# Compile message catalogs before installation
_prepare_message_catalog_compilation
- if python3_enabled; then
- (cd $dir; python${PYTHON3_VERSION} setup.py compile_catalog)
- else
- (cd $dir; python setup.py compile_catalog)
- fi
+ (cd $dir; $PYTHON setup.py compile_catalog)
setup_dev_lib "django_openstack_auth"
fi
# if we aren't using this library from git, then we just let it