blob: 18cddc193ea917dcc00512a1b9c2b35e4676c247 [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
Joshua Harlowee9064b2015-02-19 15:06:23 -080026GITDIR["debtcollector"]=$DEST/debtcollector
Sean Daguecc524062014-10-01 09:06:43 -040027GITDIR["oslo.concurrency"]=$DEST/oslo.concurrency
Davanum Srinivas092c1242014-12-08 13:48:18 -050028GITDIR["oslo.config"]=$DEST/oslo.config
Davanum Srinivas958111e2014-11-17 17:35:40 -050029GITDIR["oslo.context"]=$DEST/oslo.context
Sean Daguecc524062014-10-01 09:06:43 -040030GITDIR["oslo.db"]=$DEST/oslo.db
31GITDIR["oslo.i18n"]=$DEST/oslo.i18n
32GITDIR["oslo.log"]=$DEST/oslo.log
Sean Daguecc524062014-10-01 09:06:43 -040033GITDIR["oslo.messaging"]=$DEST/oslo.messaging
Davanum Srinivas092c1242014-12-08 13:48:18 -050034GITDIR["oslo.middleware"]=$DEST/oslo.middleware
Steve Martinelli20b027b2015-02-04 02:38:13 -050035GITDIR["oslo.policy"]=$DEST/oslo.policy
Sean Daguecc524062014-10-01 09:06:43 -040036GITDIR["oslo.rootwrap"]=$DEST/oslo.rootwrap
37GITDIR["oslo.serialization"]=$DEST/oslo.serialization
38GITDIR["oslo.utils"]=$DEST/oslo.utils
39GITDIR["oslo.vmware"]=$DEST/oslo.vmware
40GITDIR["pycadf"]=$DEST/pycadf
41GITDIR["stevedore"]=$DEST/stevedore
42GITDIR["taskflow"]=$DEST/taskflow
Julien Danjouc187b882014-12-09 15:41:55 +010043GITDIR["tooz"]=$DEST/tooz
Sean Dague1b6b5312013-07-31 06:46:34 -040044
Elena Ezhova2d451962014-06-19 12:49:32 +040045# Support entry points installation of console scripts
46OSLO_BIN_DIR=$(get_python_exec_prefix)
47
Sean Dague1b6b5312013-07-31 06:46:34 -040048# Entry Points
49# ------------
50
Sean Daguecc524062014-10-01 09:06:43 -040051function _do_install_oslo_lib {
52 local name=$1
53 if use_library_from_git "$name"; then
54 git_clone_by_name "$name"
55 setup_lib "$name"
56 fi
57}
58
Sean Dague1b6b5312013-07-31 06:46:34 -040059# install_oslo() - Collect source and prepare
Ian Wienandaee18c72014-02-21 15:35:08 +110060function install_oslo {
Sean Daguecc524062014-10-01 09:06:43 -040061 _do_install_oslo_lib "cliff"
Joshua Harlowee9064b2015-02-19 15:06:23 -080062 _do_install_oslo_lib "debtcollector"
Sean Daguecc524062014-10-01 09:06:43 -040063 _do_install_oslo_lib "oslo.concurrency"
Davanum Srinivas092c1242014-12-08 13:48:18 -050064 _do_install_oslo_lib "oslo.config"
65 _do_install_oslo_lib "oslo.context"
Sean Daguecc524062014-10-01 09:06:43 -040066 _do_install_oslo_lib "oslo.db"
Davanum Srinivas092c1242014-12-08 13:48:18 -050067 _do_install_oslo_lib "oslo.i18n"
68 _do_install_oslo_lib "oslo.log"
69 _do_install_oslo_lib "oslo.messaging"
70 _do_install_oslo_lib "oslo.middleware"
Steve Martinelli20b027b2015-02-04 02:38:13 -050071 _do_install_oslo_lib "oslo.policy"
Davanum Srinivas092c1242014-12-08 13:48:18 -050072 _do_install_oslo_lib "oslo.rootwrap"
73 _do_install_oslo_lib "oslo.serialization"
74 _do_install_oslo_lib "oslo.utils"
Sean Dagueb7cda382014-10-03 08:00:52 -040075 _do_install_oslo_lib "oslo.vmware"
Sean Daguecc524062014-10-01 09:06:43 -040076 _do_install_oslo_lib "pycadf"
77 _do_install_oslo_lib "stevedore"
78 _do_install_oslo_lib "taskflow"
Julien Danjouc187b882014-12-09 15:41:55 +010079 _do_install_oslo_lib "tooz"
Sean Daguedb5fadb2013-08-09 13:41:33 -040080}
81
Sean Dague1b6b5312013-07-31 06:46:34 -040082# Restore xtrace
83$XTRACE
84
Adam Spiers6a5aa7c2013-10-24 11:27:02 +010085# Tell emacs to use shell-script-mode
86## Local variables:
87## mode: shell-script
88## End: