From 3c8973a90abc7601e46e2fcaf3d50343338e24d8 Mon Sep 17 00:00:00 2001 From: Sean Dague Date: Fri, 14 Nov 2014 09:31:02 -0500 Subject: [PATCH] support installing django_openstack_auth from pypi Part of the libs from pypi conversion, convert django_openstack_auth to this format. Change-Id: I97c8ea19d8aed1e0bdd62c06cfadd1d616573d76 --- lib/horizon | 26 +++++++++++++------------- stackrc | 4 ++-- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/lib/horizon b/lib/horizon index 0213948633..1b53831135 100644 --- a/lib/horizon +++ b/lib/horizon @@ -25,8 +25,9 @@ set +o xtrace # -------- # Set up default directories +GITDIR["django_openstack_auth"]=$DEST/django_openstack_auth + HORIZON_DIR=$DEST/horizon -HORIZONAUTH_DIR=$DEST/django_openstack_auth # local_settings.py is used to customize Dashboard settings. # The example file in Horizon repo is used by default. @@ -89,9 +90,7 @@ function configure_horizon { # 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. - cd $HORIZON_DIR - ./run_tests.sh -N --compilemessages - cd - + (cd $HORIZON_DIR; ./run_tests.sh -N --compilemessages) } # init_horizon() - Initialize databases, etc. @@ -145,15 +144,16 @@ function init_horizon { # install_django_openstack_auth() - Collect source and prepare function install_django_openstack_auth { - git_clone $HORIZONAUTH_REPO $HORIZONAUTH_DIR $HORIZONAUTH_BRANCH - - # Compile message catalogs before installation - _prepare_message_catalog_compilation - cd $HORIZONAUTH_DIR - python setup.py compile_catalog - cd - - - setup_install $HORIZONAUTH_DIR + if use_library_from_git "django_openstack_auth"; then + local dir=${GITDIR["django_openstack_auth"]} + git_clone_by_name "django_openstack_auth" + # Compile message catalogs before installation + _prepare_message_catalog_compilation + (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 + # get dragged in by the horizon setup. } # install_horizon() - Collect source and prepare diff --git a/stackrc b/stackrc index 75f606f382..a404ad88f4 100644 --- a/stackrc +++ b/stackrc @@ -350,8 +350,8 @@ HEAT_TEMPLATES_REPO=${HEAT_TEMPLATES_REPO:-${GIT_BASE}/openstack/heat-templates. HEAT_TEMPLATES_BRANCH=${HEAT_TEMPLATES_BRANCH:-master} # django openstack_auth library -HORIZONAUTH_REPO=${HORIZONAUTH_REPO:-${GIT_BASE}/openstack/django_openstack_auth.git} -HORIZONAUTH_BRANCH=${HORIZONAUTH_BRANCH:-master} +GITREPO["django_openstack_auth"]=${HORIZONAUTH_REPO:-${GIT_BASE}/openstack/django_openstack_auth.git} +GITBRANCH["django_openstack_auth"]=${HORIZONAUTH_BRANCH:-master} # keystone middleware KEYSTONEMIDDLEWARE_REPO=${KEYSTONEMIDDLEWARE_REPO:-${GIT_BASE}/openstack/keystonemiddleware.git}