blob: 1fff1f5d325f84c0fe3bb43a954ec72a4269d449 [file] [log] [blame]
Sean Dague1b6b5312013-07-31 06:46:34 -04001# lib/oslo
2#
3# Functions to install oslo libraries from git
4#
5# We need this to handle the fact that projects would like to use
6# pre-released versions of oslo libraries.
7
8# Dependencies:
Adam Spiers6a5aa7c2013-10-24 11:27:02 +01009#
10# - ``functions`` file
Sean Dague1b6b5312013-07-31 06:46:34 -040011
12# ``stack.sh`` calls the entry points in this order:
13#
Adam Spiers6a5aa7c2013-10-24 11:27:02 +010014# - install_oslo
Sean Dague1b6b5312013-07-31 06:46:34 -040015
16# Save trace setting
17XTRACE=$(set +o | grep xtrace)
18set +o xtrace
19
20
21# Defaults
22# --------
Sean Daguecc524062014-10-01 09:06:43 -040023GITDIR["cliff"]=$DEST/cliff
Sean Daguecc524062014-10-01 09:06:43 -040024GITDIR["oslo.concurrency"]=$DEST/oslo.concurrency
Davanum Srinivas092c1242014-12-08 13:48:18 -050025GITDIR["oslo.config"]=$DEST/oslo.config
Davanum Srinivas958111e2014-11-17 17:35:40 -050026GITDIR["oslo.context"]=$DEST/oslo.context
Sean Daguecc524062014-10-01 09:06:43 -040027GITDIR["oslo.db"]=$DEST/oslo.db
28GITDIR["oslo.i18n"]=$DEST/oslo.i18n
29GITDIR["oslo.log"]=$DEST/oslo.log
Sean Daguecc524062014-10-01 09:06:43 -040030GITDIR["oslo.messaging"]=$DEST/oslo.messaging
Davanum Srinivas092c1242014-12-08 13:48:18 -050031GITDIR["oslo.middleware"]=$DEST/oslo.middleware
Sean Daguecc524062014-10-01 09:06:43 -040032GITDIR["oslo.rootwrap"]=$DEST/oslo.rootwrap
33GITDIR["oslo.serialization"]=$DEST/oslo.serialization
34GITDIR["oslo.utils"]=$DEST/oslo.utils
35GITDIR["oslo.vmware"]=$DEST/oslo.vmware
36GITDIR["pycadf"]=$DEST/pycadf
37GITDIR["stevedore"]=$DEST/stevedore
38GITDIR["taskflow"]=$DEST/taskflow
Sean Dague1b6b5312013-07-31 06:46:34 -040039
Elena Ezhova2d451962014-06-19 12:49:32 +040040# Support entry points installation of console scripts
41OSLO_BIN_DIR=$(get_python_exec_prefix)
42
Sean Dague1b6b5312013-07-31 06:46:34 -040043# Entry Points
44# ------------
45
Sean Daguecc524062014-10-01 09:06:43 -040046function _do_install_oslo_lib {
47 local name=$1
48 if use_library_from_git "$name"; then
49 git_clone_by_name "$name"
50 setup_lib "$name"
51 fi
52}
53
Sean Dague1b6b5312013-07-31 06:46:34 -040054# install_oslo() - Collect source and prepare
Ian Wienandaee18c72014-02-21 15:35:08 +110055function install_oslo {
Sean Daguecc524062014-10-01 09:06:43 -040056 _do_install_oslo_lib "cliff"
Sean Daguecc524062014-10-01 09:06:43 -040057 _do_install_oslo_lib "oslo.concurrency"
Davanum Srinivas092c1242014-12-08 13:48:18 -050058 _do_install_oslo_lib "oslo.config"
59 _do_install_oslo_lib "oslo.context"
Sean Daguecc524062014-10-01 09:06:43 -040060 _do_install_oslo_lib "oslo.db"
Davanum Srinivas092c1242014-12-08 13:48:18 -050061 _do_install_oslo_lib "oslo.i18n"
62 _do_install_oslo_lib "oslo.log"
63 _do_install_oslo_lib "oslo.messaging"
64 _do_install_oslo_lib "oslo.middleware"
65 _do_install_oslo_lib "oslo.rootwrap"
66 _do_install_oslo_lib "oslo.serialization"
67 _do_install_oslo_lib "oslo.utils"
Sean Dagueb7cda382014-10-03 08:00:52 -040068 _do_install_oslo_lib "oslo.vmware"
Sean Daguecc524062014-10-01 09:06:43 -040069 _do_install_oslo_lib "pycadf"
70 _do_install_oslo_lib "stevedore"
71 _do_install_oslo_lib "taskflow"
Sean Daguedb5fadb2013-08-09 13:41:33 -040072}
73
Sean Dague1b6b5312013-07-31 06:46:34 -040074# Restore xtrace
75$XTRACE
76
Adam Spiers6a5aa7c2013-10-24 11:27:02 +010077# Tell emacs to use shell-script-mode
78## Local variables:
79## mode: shell-script
80## End: