blob: b4f3c31d5e6cacfdc921b40c3e64626b66c668ad [file] [log] [blame]
Sean Dague3ed99c02017-06-20 14:09:30 -04001#!/bin/bash
2#
3# lib/oslo
4#
Sean Dague7e41c6c2017-06-21 10:55:16 -04005# Functions to install libraries from git
Sean Dague3ed99c02017-06-20 14:09:30 -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:
11#
12# - ``functions`` file
13
14# ``stack.sh`` calls the entry points in this order:
15#
Sean Dague7e41c6c2017-06-21 10:55:16 -040016# - install_libraries
Sean Dague3ed99c02017-06-20 14:09:30 -040017
18# Save trace setting
Sean Dague7e41c6c2017-06-21 10:55:16 -040019_XTRACE_LIB_LIBRARIES=$(set +o | grep xtrace)
Sean Dague3ed99c02017-06-20 14:09:30 -040020set +o xtrace
21
22
23# Defaults
24# --------
25GITDIR["automaton"]=$DEST/automaton
26GITDIR["castellan"]=$DEST/castellan
27GITDIR["cliff"]=$DEST/cliff
28GITDIR["cursive"]=$DEST/cursive
29GITDIR["debtcollector"]=$DEST/debtcollector
30GITDIR["futurist"]=$DEST/futurist
Monty Taylor236250f2018-03-23 08:27:57 -050031GITDIR["openstacksdk"]=$DEST/openstacksdk
Sean Dague3ed99c02017-06-20 14:09:30 -040032GITDIR["os-client-config"]=$DEST/os-client-config
33GITDIR["osc-lib"]=$DEST/osc-lib
Roman Podoliakaa066abe2017-04-18 16:18:14 +030034GITDIR["osc-placement"]=$DEST/osc-placement
Sean Dague3ed99c02017-06-20 14:09:30 -040035GITDIR["oslo.cache"]=$DEST/oslo.cache
36GITDIR["oslo.concurrency"]=$DEST/oslo.concurrency
37GITDIR["oslo.config"]=$DEST/oslo.config
38GITDIR["oslo.context"]=$DEST/oslo.context
39GITDIR["oslo.db"]=$DEST/oslo.db
40GITDIR["oslo.i18n"]=$DEST/oslo.i18n
41GITDIR["oslo.log"]=$DEST/oslo.log
42GITDIR["oslo.messaging"]=$DEST/oslo.messaging
43GITDIR["oslo.middleware"]=$DEST/oslo.middleware
44GITDIR["oslo.policy"]=$DEST/oslo.policy
45GITDIR["oslo.privsep"]=$DEST/oslo.privsep
46GITDIR["oslo.reports"]=$DEST/oslo.reports
47GITDIR["oslo.rootwrap"]=$DEST/oslo.rootwrap
48GITDIR["oslo.serialization"]=$DEST/oslo.serialization
49GITDIR["oslo.service"]=$DEST/oslo.service
50GITDIR["oslo.utils"]=$DEST/oslo.utils
51GITDIR["oslo.versionedobjects"]=$DEST/oslo.versionedobjects
52GITDIR["oslo.vmware"]=$DEST/oslo.vmware
53GITDIR["osprofiler"]=$DEST/osprofiler
54GITDIR["pycadf"]=$DEST/pycadf
Sean Dague3ed99c02017-06-20 14:09:30 -040055GITDIR["stevedore"]=$DEST/stevedore
56GITDIR["taskflow"]=$DEST/taskflow
57GITDIR["tooz"]=$DEST/tooz
Sean Dague7e41c6c2017-06-21 10:55:16 -040058
59# Non oslo libraries are welcomed below as well, this prevents
60# duplication of this code.
Sean Dague99a64772017-06-21 10:46:12 -040061GITDIR["os-brick"]=$DEST/os-brick
Sean Dague7e41c6c2017-06-21 10:55:16 -040062GITDIR["os-traits"]=$DEST/os-traits
Sean Dague3ed99c02017-06-20 14:09:30 -040063
64# Support entry points installation of console scripts
65OSLO_BIN_DIR=$(get_python_exec_prefix)
66
67
68# Functions
69# ---------
70
71function _install_lib_from_source {
72 local name=$1
73 if use_library_from_git "$name"; then
74 git_clone_by_name "$name"
75 setup_dev_lib "$name"
76 fi
77}
78
79# install_oslo - install libraries that oslo needs
80function install_oslo {
81 install_libs
82}
83
84# install_libs() - Install additional libraries that we need and want
85# on all environments. Some will only install here if from source,
86# others will always install.
87function install_libs {
88 _install_lib_from_source "automaton"
89 _install_lib_from_source "castellan"
90 _install_lib_from_source "cliff"
91 _install_lib_from_source "cursive"
92 _install_lib_from_source "debtcollector"
93 _install_lib_from_source "futurist"
Dean Troyeraab248b2018-03-28 10:05:05 -050094 _install_lib_from_source "openstacksdk"
Sean Dague3ed99c02017-06-20 14:09:30 -040095 _install_lib_from_source "osc-lib"
Roman Podoliakaa066abe2017-04-18 16:18:14 +030096 _install_lib_from_source "osc-placement"
Sean Dague3ed99c02017-06-20 14:09:30 -040097 _install_lib_from_source "os-client-config"
98 _install_lib_from_source "oslo.cache"
99 _install_lib_from_source "oslo.concurrency"
100 _install_lib_from_source "oslo.config"
101 _install_lib_from_source "oslo.context"
102 _install_lib_from_source "oslo.db"
103 _install_lib_from_source "oslo.i18n"
104 _install_lib_from_source "oslo.log"
105 _install_lib_from_source "oslo.messaging"
106 _install_lib_from_source "oslo.middleware"
107 _install_lib_from_source "oslo.policy"
108 _install_lib_from_source "oslo.privsep"
109 _install_lib_from_source "oslo.reports"
110 _install_lib_from_source "oslo.rootwrap"
111 _install_lib_from_source "oslo.serialization"
112 _install_lib_from_source "oslo.service"
113 _install_lib_from_source "oslo.utils"
114 _install_lib_from_source "oslo.versionedobjects"
115 _install_lib_from_source "oslo.vmware"
116 _install_lib_from_source "osprofiler"
117 _install_lib_from_source "pycadf"
Sean Dague3ed99c02017-06-20 14:09:30 -0400118 _install_lib_from_source "stevedore"
119 _install_lib_from_source "taskflow"
120 _install_lib_from_source "tooz"
121 # installation of additional libraries
122 #
123 # os-traits for nova
Sean Dague99a64772017-06-21 10:46:12 -0400124 _install_lib_from_source "os-brick"
Sean Dague7e41c6c2017-06-21 10:55:16 -0400125 _install_lib_from_source "os-traits"
Kaitlin Farred7dbe52017-06-19 16:50:38 -0400126 #
127 # python client libraries we might need from git can go here
128 _install_lib_from_source "python-barbicanclient"
Sean Dague99a64772017-06-21 10:46:12 -0400129
Sean Dague3ed99c02017-06-20 14:09:30 -0400130
131 # etcd (because tooz does not have a hard dependency on these)
Sean Dague7e41c6c2017-06-21 10:55:16 -0400132 #
133 # NOTE(sdague): this is currently a work around because tooz
134 # doesn't pull in etcd3.
Sean Dague3ed99c02017-06-20 14:09:30 -0400135 pip_install etcd3
136 pip_install etcd3gw
137}
138
139# Restore xtrace
Sean Dague7e41c6c2017-06-21 10:55:16 -0400140$_XTRACE_LIB_LIBRARIES
Sean Dague3ed99c02017-06-20 14:09:30 -0400141
142# Tell emacs to use shell-script-mode
143## Local variables:
144## mode: shell-script
145## End: