| Sean Dague | 3ed99c0 | 2017-06-20 14:09:30 -0400 | [diff] [blame] | 1 | #!/bin/bash | 
|  | 2 | # | 
| Takashi Kajinami | ef63c69 | 2024-11-24 22:48:08 +0900 | [diff] [blame] | 3 | # lib/libraries | 
| Sean Dague | 3ed99c0 | 2017-06-20 14:09:30 -0400 | [diff] [blame] | 4 | # | 
| Sean Dague | 7e41c6c | 2017-06-21 10:55:16 -0400 | [diff] [blame] | 5 | # Functions to install libraries from git | 
| Sean Dague | 3ed99c0 | 2017-06-20 14:09:30 -0400 | [diff] [blame] | 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: | 
|  | 11 | # | 
|  | 12 | # - ``functions`` file | 
|  | 13 |  | 
|  | 14 | # ``stack.sh`` calls the entry points in this order: | 
|  | 15 | # | 
| Sean Dague | 7e41c6c | 2017-06-21 10:55:16 -0400 | [diff] [blame] | 16 | # - install_libraries | 
| Sean Dague | 3ed99c0 | 2017-06-20 14:09:30 -0400 | [diff] [blame] | 17 |  | 
|  | 18 | # Save trace setting | 
| Sean Dague | 7e41c6c | 2017-06-21 10:55:16 -0400 | [diff] [blame] | 19 | _XTRACE_LIB_LIBRARIES=$(set +o | grep xtrace) | 
| Sean Dague | 3ed99c0 | 2017-06-20 14:09:30 -0400 | [diff] [blame] | 20 | set +o xtrace | 
|  | 21 |  | 
|  | 22 |  | 
|  | 23 | # Defaults | 
|  | 24 | # -------- | 
|  | 25 | GITDIR["automaton"]=$DEST/automaton | 
|  | 26 | GITDIR["castellan"]=$DEST/castellan | 
|  | 27 | GITDIR["cliff"]=$DEST/cliff | 
|  | 28 | GITDIR["cursive"]=$DEST/cursive | 
|  | 29 | GITDIR["debtcollector"]=$DEST/debtcollector | 
|  | 30 | GITDIR["futurist"]=$DEST/futurist | 
| Monty Taylor | 236250f | 2018-03-23 08:27:57 -0500 | [diff] [blame] | 31 | GITDIR["openstacksdk"]=$DEST/openstacksdk | 
| Sean Dague | 3ed99c0 | 2017-06-20 14:09:30 -0400 | [diff] [blame] | 32 | GITDIR["os-client-config"]=$DEST/os-client-config | 
|  | 33 | GITDIR["osc-lib"]=$DEST/osc-lib | 
| Roman Podoliaka | a066abe | 2017-04-18 16:18:14 +0300 | [diff] [blame] | 34 | GITDIR["osc-placement"]=$DEST/osc-placement | 
| Sean Dague | 3ed99c0 | 2017-06-20 14:09:30 -0400 | [diff] [blame] | 35 | GITDIR["oslo.cache"]=$DEST/oslo.cache | 
|  | 36 | GITDIR["oslo.concurrency"]=$DEST/oslo.concurrency | 
|  | 37 | GITDIR["oslo.config"]=$DEST/oslo.config | 
|  | 38 | GITDIR["oslo.context"]=$DEST/oslo.context | 
|  | 39 | GITDIR["oslo.db"]=$DEST/oslo.db | 
|  | 40 | GITDIR["oslo.i18n"]=$DEST/oslo.i18n | 
| melanie witt | c779130 | 2021-10-01 17:24:10 +0000 | [diff] [blame] | 41 | GITDIR["oslo.limit"]=$DEST/oslo.limit | 
| Sean Dague | 3ed99c0 | 2017-06-20 14:09:30 -0400 | [diff] [blame] | 42 | GITDIR["oslo.log"]=$DEST/oslo.log | 
|  | 43 | GITDIR["oslo.messaging"]=$DEST/oslo.messaging | 
|  | 44 | GITDIR["oslo.middleware"]=$DEST/oslo.middleware | 
|  | 45 | GITDIR["oslo.policy"]=$DEST/oslo.policy | 
|  | 46 | GITDIR["oslo.privsep"]=$DEST/oslo.privsep | 
|  | 47 | GITDIR["oslo.reports"]=$DEST/oslo.reports | 
|  | 48 | GITDIR["oslo.rootwrap"]=$DEST/oslo.rootwrap | 
|  | 49 | GITDIR["oslo.serialization"]=$DEST/oslo.serialization | 
|  | 50 | GITDIR["oslo.service"]=$DEST/oslo.service | 
|  | 51 | GITDIR["oslo.utils"]=$DEST/oslo.utils | 
|  | 52 | GITDIR["oslo.versionedobjects"]=$DEST/oslo.versionedobjects | 
|  | 53 | GITDIR["oslo.vmware"]=$DEST/oslo.vmware | 
|  | 54 | GITDIR["osprofiler"]=$DEST/osprofiler | 
|  | 55 | GITDIR["pycadf"]=$DEST/pycadf | 
| Sean Dague | 3ed99c0 | 2017-06-20 14:09:30 -0400 | [diff] [blame] | 56 | GITDIR["stevedore"]=$DEST/stevedore | 
|  | 57 | GITDIR["taskflow"]=$DEST/taskflow | 
|  | 58 | GITDIR["tooz"]=$DEST/tooz | 
| Sean Dague | 7e41c6c | 2017-06-21 10:55:16 -0400 | [diff] [blame] | 59 |  | 
|  | 60 | # Non oslo libraries are welcomed below as well, this prevents | 
|  | 61 | # duplication of this code. | 
| Sean Dague | 99a6477 | 2017-06-21 10:46:12 -0400 | [diff] [blame] | 62 | GITDIR["os-brick"]=$DEST/os-brick | 
| Przemyslaw Szczerbik | 1ab6313 | 2021-07-06 14:26:40 +0200 | [diff] [blame] | 63 | GITDIR["os-resource-classes"]=$DEST/os-resource-classes | 
| Sean Dague | 7e41c6c | 2017-06-21 10:55:16 -0400 | [diff] [blame] | 64 | GITDIR["os-traits"]=$DEST/os-traits | 
| Sean Dague | 3ed99c0 | 2017-06-20 14:09:30 -0400 | [diff] [blame] | 65 |  | 
|  | 66 | # Support entry points installation of console scripts | 
|  | 67 | OSLO_BIN_DIR=$(get_python_exec_prefix) | 
|  | 68 |  | 
|  | 69 |  | 
|  | 70 | # Functions | 
|  | 71 | # --------- | 
|  | 72 |  | 
|  | 73 | function _install_lib_from_source { | 
|  | 74 | local name=$1 | 
|  | 75 | if use_library_from_git "$name"; then | 
|  | 76 | git_clone_by_name "$name" | 
| Sean McGinnis | dd3731c | 2020-07-28 08:51:41 -0500 | [diff] [blame] | 77 | setup_dev_lib -bindep "$name" | 
| Sean Dague | 3ed99c0 | 2017-06-20 14:09:30 -0400 | [diff] [blame] | 78 | fi | 
|  | 79 | } | 
|  | 80 |  | 
|  | 81 | # install_oslo - install libraries that oslo needs | 
|  | 82 | function install_oslo { | 
|  | 83 | install_libs | 
|  | 84 | } | 
|  | 85 |  | 
|  | 86 | # install_libs() - Install additional libraries that we need and want | 
|  | 87 | # on all environments. Some will only install here if from source, | 
|  | 88 | # others will always install. | 
|  | 89 | function install_libs { | 
|  | 90 | _install_lib_from_source "automaton" | 
|  | 91 | _install_lib_from_source "castellan" | 
|  | 92 | _install_lib_from_source "cliff" | 
|  | 93 | _install_lib_from_source "cursive" | 
|  | 94 | _install_lib_from_source "debtcollector" | 
|  | 95 | _install_lib_from_source "futurist" | 
| Dean Troyer | aab248b | 2018-03-28 10:05:05 -0500 | [diff] [blame] | 96 | _install_lib_from_source "openstacksdk" | 
| Sean Dague | 3ed99c0 | 2017-06-20 14:09:30 -0400 | [diff] [blame] | 97 | _install_lib_from_source "osc-lib" | 
| Roman Podoliaka | a066abe | 2017-04-18 16:18:14 +0300 | [diff] [blame] | 98 | _install_lib_from_source "osc-placement" | 
| Sean Dague | 3ed99c0 | 2017-06-20 14:09:30 -0400 | [diff] [blame] | 99 | _install_lib_from_source "os-client-config" | 
|  | 100 | _install_lib_from_source "oslo.cache" | 
|  | 101 | _install_lib_from_source "oslo.concurrency" | 
|  | 102 | _install_lib_from_source "oslo.config" | 
|  | 103 | _install_lib_from_source "oslo.context" | 
|  | 104 | _install_lib_from_source "oslo.db" | 
|  | 105 | _install_lib_from_source "oslo.i18n" | 
| melanie witt | c779130 | 2021-10-01 17:24:10 +0000 | [diff] [blame] | 106 | _install_lib_from_source "oslo.limit" | 
| Sean Dague | 3ed99c0 | 2017-06-20 14:09:30 -0400 | [diff] [blame] | 107 | _install_lib_from_source "oslo.log" | 
|  | 108 | _install_lib_from_source "oslo.messaging" | 
|  | 109 | _install_lib_from_source "oslo.middleware" | 
|  | 110 | _install_lib_from_source "oslo.policy" | 
|  | 111 | _install_lib_from_source "oslo.privsep" | 
|  | 112 | _install_lib_from_source "oslo.reports" | 
|  | 113 | _install_lib_from_source "oslo.rootwrap" | 
|  | 114 | _install_lib_from_source "oslo.serialization" | 
|  | 115 | _install_lib_from_source "oslo.service" | 
|  | 116 | _install_lib_from_source "oslo.utils" | 
|  | 117 | _install_lib_from_source "oslo.versionedobjects" | 
|  | 118 | _install_lib_from_source "oslo.vmware" | 
|  | 119 | _install_lib_from_source "osprofiler" | 
|  | 120 | _install_lib_from_source "pycadf" | 
| Sean Dague | 3ed99c0 | 2017-06-20 14:09:30 -0400 | [diff] [blame] | 121 | _install_lib_from_source "stevedore" | 
|  | 122 | _install_lib_from_source "taskflow" | 
|  | 123 | _install_lib_from_source "tooz" | 
|  | 124 | # installation of additional libraries | 
|  | 125 | # | 
|  | 126 | # os-traits for nova | 
| Sean Dague | 99a6477 | 2017-06-21 10:46:12 -0400 | [diff] [blame] | 127 | _install_lib_from_source "os-brick" | 
| Przemyslaw Szczerbik | 1ab6313 | 2021-07-06 14:26:40 +0200 | [diff] [blame] | 128 | _install_lib_from_source "os-resource-classes" | 
| Sean Dague | 7e41c6c | 2017-06-21 10:55:16 -0400 | [diff] [blame] | 129 | _install_lib_from_source "os-traits" | 
| Kaitlin Farr | ed7dbe5 | 2017-06-19 16:50:38 -0400 | [diff] [blame] | 130 | # | 
|  | 131 | # python client libraries we might need from git can go here | 
|  | 132 | _install_lib_from_source "python-barbicanclient" | 
| Sean Dague | 99a6477 | 2017-06-21 10:46:12 -0400 | [diff] [blame] | 133 |  | 
| Sean Dague | 3ed99c0 | 2017-06-20 14:09:30 -0400 | [diff] [blame] | 134 | # etcd (because tooz does not have a hard dependency on these) | 
| Sean Dague | 3ed99c0 | 2017-06-20 14:09:30 -0400 | [diff] [blame] | 135 | pip_install etcd3gw | 
|  | 136 | } | 
|  | 137 |  | 
|  | 138 | # Restore xtrace | 
| Sean Dague | 7e41c6c | 2017-06-21 10:55:16 -0400 | [diff] [blame] | 139 | $_XTRACE_LIB_LIBRARIES | 
| Sean Dague | 3ed99c0 | 2017-06-20 14:09:30 -0400 | [diff] [blame] | 140 |  | 
|  | 141 | # Tell emacs to use shell-script-mode | 
|  | 142 | ## Local variables: | 
|  | 143 | ## mode: shell-script | 
|  | 144 | ## End: |