blob: e0b4afebdb1041b0f8f0552e95ca43707135edfb [file] [log] [blame]
Sean Daguee263c822014-12-05 14:25:28 -05001#!/bin/bash
2#
Sean Dague1b6b5312013-07-31 06:46:34 -04003# lib/oslo
4#
5# Functions to install oslo libraries from git
6#
7# We need this to handle the fact that projects would like to use
8# pre-released versions of oslo libraries.
9
10# Dependencies:
Adam Spiers6a5aa7c2013-10-24 11:27:02 +010011#
12# - ``functions`` file
Sean Dague1b6b5312013-07-31 06:46:34 -040013
14# ``stack.sh`` calls the entry points in this order:
15#
Adam Spiers6a5aa7c2013-10-24 11:27:02 +010016# - install_oslo
Sean Dague1b6b5312013-07-31 06:46:34 -040017
18# Save trace setting
19XTRACE=$(set +o | grep xtrace)
20set +o xtrace
21
22
23# Defaults
24# --------
Sean Daguecc524062014-10-01 09:06:43 -040025GITDIR["cliff"]=$DEST/cliff
26GITDIR["oslo.config"]=$DEST/oslo.config
27GITDIR["oslo.concurrency"]=$DEST/oslo.concurrency
Davanum Srinivas958111e2014-11-17 17:35:40 -050028GITDIR["oslo.context"]=$DEST/oslo.context
Sean Daguecc524062014-10-01 09:06:43 -040029GITDIR["oslo.db"]=$DEST/oslo.db
30GITDIR["oslo.i18n"]=$DEST/oslo.i18n
31GITDIR["oslo.log"]=$DEST/oslo.log
32GITDIR["oslo.middleware"]=$DEST/oslo.middleware
33GITDIR["oslo.messaging"]=$DEST/oslo.messaging
34GITDIR["oslo.rootwrap"]=$DEST/oslo.rootwrap
35GITDIR["oslo.serialization"]=$DEST/oslo.serialization
36GITDIR["oslo.utils"]=$DEST/oslo.utils
37GITDIR["oslo.vmware"]=$DEST/oslo.vmware
38GITDIR["pycadf"]=$DEST/pycadf
39GITDIR["stevedore"]=$DEST/stevedore
40GITDIR["taskflow"]=$DEST/taskflow
Sean Dague1b6b5312013-07-31 06:46:34 -040041
Elena Ezhova2d451962014-06-19 12:49:32 +040042# Support entry points installation of console scripts
43OSLO_BIN_DIR=$(get_python_exec_prefix)
44
Sean Dague1b6b5312013-07-31 06:46:34 -040045# Entry Points
46# ------------
47
Sean Daguecc524062014-10-01 09:06:43 -040048function _do_install_oslo_lib {
49 local name=$1
50 if use_library_from_git "$name"; then
51 git_clone_by_name "$name"
52 setup_lib "$name"
53 fi
54}
55
Sean Dague1b6b5312013-07-31 06:46:34 -040056# install_oslo() - Collect source and prepare
Ian Wienandaee18c72014-02-21 15:35:08 +110057function install_oslo {
Sean Daguecc524062014-10-01 09:06:43 -040058 _do_install_oslo_lib "cliff"
59 _do_install_oslo_lib "oslo.i18n"
60 _do_install_oslo_lib "oslo.utils"
61 _do_install_oslo_lib "oslo.serialization"
62 _do_install_oslo_lib "oslo.config"
63 _do_install_oslo_lib "oslo.concurrency"
64 _do_install_oslo_lib "oslo.log"
65 _do_install_oslo_lib "oslo.middleware"
66 _do_install_oslo_lib "oslo.messaging"
67 _do_install_oslo_lib "oslo.rootwrap"
68 _do_install_oslo_lib "oslo.db"
Sean Dagueb7cda382014-10-03 08:00:52 -040069 _do_install_oslo_lib "oslo.vmware"
Sean Daguecc524062014-10-01 09:06:43 -040070 _do_install_oslo_lib "pycadf"
71 _do_install_oslo_lib "stevedore"
72 _do_install_oslo_lib "taskflow"
Sean Daguedb5fadb2013-08-09 13:41:33 -040073}
74
Sean Dague1b6b5312013-07-31 06:46:34 -040075# Restore xtrace
76$XTRACE
77
Adam Spiers6a5aa7c2013-10-24 11:27:02 +010078# Tell emacs to use shell-script-mode
79## Local variables:
80## mode: shell-script
81## End: