blob: b195687bb7a52347c4cb0a7aff0babcb77f4d753 [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
Sean Daguecc524062014-10-01 09:06:43 -040028GITDIR["oslo.concurrency"]=$DEST/oslo.concurrency
Davanum Srinivas092c1242014-12-08 13:48:18 -050029GITDIR["oslo.config"]=$DEST/oslo.config
Davanum Srinivas958111e2014-11-17 17:35:40 -050030GITDIR["oslo.context"]=$DEST/oslo.context
Sean Daguecc524062014-10-01 09:06:43 -040031GITDIR["oslo.db"]=$DEST/oslo.db
32GITDIR["oslo.i18n"]=$DEST/oslo.i18n
33GITDIR["oslo.log"]=$DEST/oslo.log
Sean Daguecc524062014-10-01 09:06:43 -040034GITDIR["oslo.messaging"]=$DEST/oslo.messaging
Davanum Srinivas092c1242014-12-08 13:48:18 -050035GITDIR["oslo.middleware"]=$DEST/oslo.middleware
Steve Martinelli20b027b2015-02-04 02:38:13 -050036GITDIR["oslo.policy"]=$DEST/oslo.policy
Sean Daguecc524062014-10-01 09:06:43 -040037GITDIR["oslo.rootwrap"]=$DEST/oslo.rootwrap
38GITDIR["oslo.serialization"]=$DEST/oslo.serialization
39GITDIR["oslo.utils"]=$DEST/oslo.utils
Dan Smithaca8a7f2015-03-03 08:50:27 -080040GITDIR["oslo.versionedobjects"]=$DEST/oslo.versionedobjects
Sean Daguecc524062014-10-01 09:06:43 -040041GITDIR["oslo.vmware"]=$DEST/oslo.vmware
42GITDIR["pycadf"]=$DEST/pycadf
43GITDIR["stevedore"]=$DEST/stevedore
44GITDIR["taskflow"]=$DEST/taskflow
Julien Danjouc187b882014-12-09 15:41:55 +010045GITDIR["tooz"]=$DEST/tooz
Sean Dague1b6b5312013-07-31 06:46:34 -040046
Elena Ezhova2d451962014-06-19 12:49:32 +040047# Support entry points installation of console scripts
48OSLO_BIN_DIR=$(get_python_exec_prefix)
49
Dean Troyerdc97cb72015-03-28 08:20:50 -050050
51# Functions
52# ---------
Sean Dague1b6b5312013-07-31 06:46:34 -040053
Sean Daguecc524062014-10-01 09:06:43 -040054function _do_install_oslo_lib {
55 local name=$1
56 if use_library_from_git "$name"; then
57 git_clone_by_name "$name"
58 setup_lib "$name"
59 fi
60}
61
Sean Dague1b6b5312013-07-31 06:46:34 -040062# install_oslo() - Collect source and prepare
Ian Wienandaee18c72014-02-21 15:35:08 +110063function install_oslo {
Sean Daguecc524062014-10-01 09:06:43 -040064 _do_install_oslo_lib "cliff"
Joshua Harlowee9064b2015-02-19 15:06:23 -080065 _do_install_oslo_lib "debtcollector"
Sean Daguecc524062014-10-01 09:06:43 -040066 _do_install_oslo_lib "oslo.concurrency"
Davanum Srinivas092c1242014-12-08 13:48:18 -050067 _do_install_oslo_lib "oslo.config"
68 _do_install_oslo_lib "oslo.context"
Sean Daguecc524062014-10-01 09:06:43 -040069 _do_install_oslo_lib "oslo.db"
Davanum Srinivas092c1242014-12-08 13:48:18 -050070 _do_install_oslo_lib "oslo.i18n"
71 _do_install_oslo_lib "oslo.log"
72 _do_install_oslo_lib "oslo.messaging"
73 _do_install_oslo_lib "oslo.middleware"
Steve Martinelli20b027b2015-02-04 02:38:13 -050074 _do_install_oslo_lib "oslo.policy"
Davanum Srinivas092c1242014-12-08 13:48:18 -050075 _do_install_oslo_lib "oslo.rootwrap"
76 _do_install_oslo_lib "oslo.serialization"
77 _do_install_oslo_lib "oslo.utils"
Dan Smithaca8a7f2015-03-03 08:50:27 -080078 _do_install_oslo_lib "oslo.versionedobjects"
Sean Dagueb7cda382014-10-03 08:00:52 -040079 _do_install_oslo_lib "oslo.vmware"
Sean Daguecc524062014-10-01 09:06:43 -040080 _do_install_oslo_lib "pycadf"
81 _do_install_oslo_lib "stevedore"
82 _do_install_oslo_lib "taskflow"
Julien Danjouc187b882014-12-09 15:41:55 +010083 _do_install_oslo_lib "tooz"
Sean Daguedb5fadb2013-08-09 13:41:33 -040084}
85
Sean Dague1b6b5312013-07-31 06:46:34 -040086# Restore xtrace
87$XTRACE
88
Adam Spiers6a5aa7c2013-10-24 11:27:02 +010089# Tell emacs to use shell-script-mode
90## Local variables:
91## mode: shell-script
92## End: