Skip to content

Commit af05a2d

Browse files
Jenkinsopenstack-gerrit
authored andcommitted
Merge "support installing django_openstack_auth from pypi"
2 parents 42fbce5 + 3c8973a commit af05a2d

2 files changed

Lines changed: 15 additions & 15 deletions

File tree

lib/horizon

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,9 @@ set +o xtrace
2525
# --------
2626

2727
# Set up default directories
28+
GITDIR["django_openstack_auth"]=$DEST/django_openstack_auth
29+
2830
HORIZON_DIR=$DEST/horizon
29-
HORIZONAUTH_DIR=$DEST/django_openstack_auth
3031

3132
# local_settings.py is used to customize Dashboard settings.
3233
# The example file in Horizon repo is used by default.
@@ -89,9 +90,7 @@ function configure_horizon {
8990
# Horizon is installed as develop mode, so we can compile here.
9091
# Message catalog compilation is handled by Django admin script,
9192
# so compiling them after the installation avoids Django installation twice.
92-
cd $HORIZON_DIR
93-
./run_tests.sh -N --compilemessages
94-
cd -
93+
(cd $HORIZON_DIR; ./run_tests.sh -N --compilemessages)
9594
}
9695

9796
# init_horizon() - Initialize databases, etc.
@@ -145,15 +144,16 @@ function init_horizon {
145144

146145
# install_django_openstack_auth() - Collect source and prepare
147146
function install_django_openstack_auth {
148-
git_clone $HORIZONAUTH_REPO $HORIZONAUTH_DIR $HORIZONAUTH_BRANCH
149-
150-
# Compile message catalogs before installation
151-
_prepare_message_catalog_compilation
152-
cd $HORIZONAUTH_DIR
153-
python setup.py compile_catalog
154-
cd -
155-
156-
setup_install $HORIZONAUTH_DIR
147+
if use_library_from_git "django_openstack_auth"; then
148+
local dir=${GITDIR["django_openstack_auth"]}
149+
git_clone_by_name "django_openstack_auth"
150+
# Compile message catalogs before installation
151+
_prepare_message_catalog_compilation
152+
(cd $dir; python setup.py compile_catalog)
153+
setup_dev_lib "django_openstack_auth"
154+
fi
155+
# if we aren't using this library from git, then we just let it
156+
# get dragged in by the horizon setup.
157157
}
158158

159159
# install_horizon() - Collect source and prepare

stackrc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -350,8 +350,8 @@ HEAT_TEMPLATES_REPO=${HEAT_TEMPLATES_REPO:-${GIT_BASE}/openstack/heat-templates.
350350
HEAT_TEMPLATES_BRANCH=${HEAT_TEMPLATES_BRANCH:-master}
351351

352352
# django openstack_auth library
353-
HORIZONAUTH_REPO=${HORIZONAUTH_REPO:-${GIT_BASE}/openstack/django_openstack_auth.git}
354-
HORIZONAUTH_BRANCH=${HORIZONAUTH_BRANCH:-master}
353+
GITREPO["django_openstack_auth"]=${HORIZONAUTH_REPO:-${GIT_BASE}/openstack/django_openstack_auth.git}
354+
GITBRANCH["django_openstack_auth"]=${HORIZONAUTH_BRANCH:-master}
355355

356356
# keystone middleware
357357
KEYSTONEMIDDLEWARE_REPO=${KEYSTONEMIDDLEWARE_REPO:-${GIT_BASE}/openstack/keystonemiddleware.git}

0 commit comments

Comments
 (0)