blob: f64f327ccd681af1778a71fc1b25e87dc1eb85d5 [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#
Dean Troyerdc97cb72015-03-28 08:20:50 -05005# Functions to install **Oslo** libraries from git
Sean Dague1b6b5312013-07-31 06:46:34 -04006#
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# --------
Joshua Harlow96c6b2d2015-06-08 16:48:49 -070025GITDIR["automaton"]=$DEST/automaton
Sean Daguecc524062014-10-01 09:06:43 -040026GITDIR["cliff"]=$DEST/cliff
Joshua Harlowee9064b2015-02-19 15:06:23 -080027GITDIR["debtcollector"]=$DEST/debtcollector
Joshua Harlowe3a640d2015-06-08 16:44:21 -070028GITDIR["futurist"]=$DEST/futurist
Steve Martinelli531017c2015-06-27 03:37:39 +000029GITDIR["oslo.cache"]=$DEST/oslo.cache
Sean Daguecc524062014-10-01 09:06:43 -040030GITDIR["oslo.concurrency"]=$DEST/oslo.concurrency
Davanum Srinivas092c1242014-12-08 13:48:18 -050031GITDIR["oslo.config"]=$DEST/oslo.config
Davanum Srinivas958111e2014-11-17 17:35:40 -050032GITDIR["oslo.context"]=$DEST/oslo.context
Sean Daguecc524062014-10-01 09:06:43 -040033GITDIR["oslo.db"]=$DEST/oslo.db
34GITDIR["oslo.i18n"]=$DEST/oslo.i18n
35GITDIR["oslo.log"]=$DEST/oslo.log
Sean Daguecc524062014-10-01 09:06:43 -040036GITDIR["oslo.messaging"]=$DEST/oslo.messaging
Davanum Srinivas092c1242014-12-08 13:48:18 -050037GITDIR["oslo.middleware"]=$DEST/oslo.middleware
Steve Martinelli20b027b2015-02-04 02:38:13 -050038GITDIR["oslo.policy"]=$DEST/oslo.policy
Davanum Srinivas77a7d112015-06-22 16:44:13 -040039GITDIR["oslo.reports"]=$DEST/oslo.reports
Sean Daguecc524062014-10-01 09:06:43 -040040GITDIR["oslo.rootwrap"]=$DEST/oslo.rootwrap
41GITDIR["oslo.serialization"]=$DEST/oslo.serialization
Davanum Srinivas18d1cca2015-06-18 06:32:00 -040042GITDIR["oslo.service"]=$DEST/oslo.service
Sean Daguecc524062014-10-01 09:06:43 -040043GITDIR["oslo.utils"]=$DEST/oslo.utils
Dan Smithaca8a7f2015-03-03 08:50:27 -080044GITDIR["oslo.versionedobjects"]=$DEST/oslo.versionedobjects
Sean Daguecc524062014-10-01 09:06:43 -040045GITDIR["oslo.vmware"]=$DEST/oslo.vmware
46GITDIR["pycadf"]=$DEST/pycadf
47GITDIR["stevedore"]=$DEST/stevedore
48GITDIR["taskflow"]=$DEST/taskflow
Julien Danjouc187b882014-12-09 15:41:55 +010049GITDIR["tooz"]=$DEST/tooz
Sean Dague1b6b5312013-07-31 06:46:34 -040050
Elena Ezhova2d451962014-06-19 12:49:32 +040051# Support entry points installation of console scripts
52OSLO_BIN_DIR=$(get_python_exec_prefix)
53
Dean Troyerdc97cb72015-03-28 08:20:50 -050054
55# Functions
56# ---------
Sean Dague1b6b5312013-07-31 06:46:34 -040057
Sean Daguecc524062014-10-01 09:06:43 -040058function _do_install_oslo_lib {
59 local name=$1
60 if use_library_from_git "$name"; then
61 git_clone_by_name "$name"
Sean Dague2105b9f2015-09-10 14:01:40 -040062 setup_dev_lib "$name"
Sean Daguecc524062014-10-01 09:06:43 -040063 fi
64}
65
Sean Dague1b6b5312013-07-31 06:46:34 -040066# install_oslo() - Collect source and prepare
Ian Wienandaee18c72014-02-21 15:35:08 +110067function install_oslo {
Davanum Srinivas77a7d112015-06-22 16:44:13 -040068 _do_install_oslo_lib "automaton"
Sean Daguecc524062014-10-01 09:06:43 -040069 _do_install_oslo_lib "cliff"
Joshua Harlowee9064b2015-02-19 15:06:23 -080070 _do_install_oslo_lib "debtcollector"
Joshua Harlowe3a640d2015-06-08 16:44:21 -070071 _do_install_oslo_lib "futurist"
Steve Martinelli531017c2015-06-27 03:37:39 +000072 _do_install_oslo_lib "oslo.cache"
Sean Daguecc524062014-10-01 09:06:43 -040073 _do_install_oslo_lib "oslo.concurrency"
Davanum Srinivas092c1242014-12-08 13:48:18 -050074 _do_install_oslo_lib "oslo.config"
75 _do_install_oslo_lib "oslo.context"
Sean Daguecc524062014-10-01 09:06:43 -040076 _do_install_oslo_lib "oslo.db"
Davanum Srinivas092c1242014-12-08 13:48:18 -050077 _do_install_oslo_lib "oslo.i18n"
78 _do_install_oslo_lib "oslo.log"
79 _do_install_oslo_lib "oslo.messaging"
80 _do_install_oslo_lib "oslo.middleware"
Steve Martinelli20b027b2015-02-04 02:38:13 -050081 _do_install_oslo_lib "oslo.policy"
Davanum Srinivas77a7d112015-06-22 16:44:13 -040082 _do_install_oslo_lib "oslo.reports"
Davanum Srinivas092c1242014-12-08 13:48:18 -050083 _do_install_oslo_lib "oslo.rootwrap"
84 _do_install_oslo_lib "oslo.serialization"
Davanum Srinivas18d1cca2015-06-18 06:32:00 -040085 _do_install_oslo_lib "oslo.service"
Davanum Srinivas092c1242014-12-08 13:48:18 -050086 _do_install_oslo_lib "oslo.utils"
Dan Smithaca8a7f2015-03-03 08:50:27 -080087 _do_install_oslo_lib "oslo.versionedobjects"
Sean Dagueb7cda382014-10-03 08:00:52 -040088 _do_install_oslo_lib "oslo.vmware"
Sean Daguecc524062014-10-01 09:06:43 -040089 _do_install_oslo_lib "pycadf"
90 _do_install_oslo_lib "stevedore"
91 _do_install_oslo_lib "taskflow"
Julien Danjouc187b882014-12-09 15:41:55 +010092 _do_install_oslo_lib "tooz"
Sean Daguedb5fadb2013-08-09 13:41:33 -040093}
94
Sean Dague1b6b5312013-07-31 06:46:34 -040095# Restore xtrace
96$XTRACE
97
Adam Spiers6a5aa7c2013-10-24 11:27:02 +010098# Tell emacs to use shell-script-mode
99## Local variables:
100## mode: shell-script
101## End: