blob: 31c9d348495b9f8fb7e1d2bdb09c7715464ca1f8 [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
Sean Daguecc524062014-10-01 09:06:43 -040026GITDIR["oslo.concurrency"]=$DEST/oslo.concurrency
Davanum Srinivas092c1242014-12-08 13:48:18 -050027GITDIR["oslo.config"]=$DEST/oslo.config
Davanum Srinivas958111e2014-11-17 17:35:40 -050028GITDIR["oslo.context"]=$DEST/oslo.context
Sean Daguecc524062014-10-01 09:06:43 -040029GITDIR["oslo.db"]=$DEST/oslo.db
30GITDIR["oslo.i18n"]=$DEST/oslo.i18n
31GITDIR["oslo.log"]=$DEST/oslo.log
Sean Daguecc524062014-10-01 09:06:43 -040032GITDIR["oslo.messaging"]=$DEST/oslo.messaging
Davanum Srinivas092c1242014-12-08 13:48:18 -050033GITDIR["oslo.middleware"]=$DEST/oslo.middleware
Sean Daguecc524062014-10-01 09:06:43 -040034GITDIR["oslo.rootwrap"]=$DEST/oslo.rootwrap
35GITDIR["oslo.serialization"]=$DEST/oslo.serialization
36GITDIR["oslo.utils"]=$DEST/oslo.utils
37GITDIR["oslo.vmware"]=$DEST/oslo.vmware
38GITDIR["pycadf"]=$DEST/pycadf
39GITDIR["stevedore"]=$DEST/stevedore
40GITDIR["taskflow"]=$DEST/taskflow
Julien Danjouc187b882014-12-09 15:41:55 +010041GITDIR["tooz"]=$DEST/tooz
Sean Dague1b6b5312013-07-31 06:46:34 -040042
Elena Ezhova2d451962014-06-19 12:49:32 +040043# Support entry points installation of console scripts
44OSLO_BIN_DIR=$(get_python_exec_prefix)
45
Sean Dague1b6b5312013-07-31 06:46:34 -040046# Entry Points
47# ------------
48
Sean Daguecc524062014-10-01 09:06:43 -040049function _do_install_oslo_lib {
50 local name=$1
51 if use_library_from_git "$name"; then
52 git_clone_by_name "$name"
53 setup_lib "$name"
54 fi
55}
56
Sean Dague1b6b5312013-07-31 06:46:34 -040057# install_oslo() - Collect source and prepare
Ian Wienandaee18c72014-02-21 15:35:08 +110058function install_oslo {
Sean Daguecc524062014-10-01 09:06:43 -040059 _do_install_oslo_lib "cliff"
Sean Daguecc524062014-10-01 09:06:43 -040060 _do_install_oslo_lib "oslo.concurrency"
Davanum Srinivas092c1242014-12-08 13:48:18 -050061 _do_install_oslo_lib "oslo.config"
62 _do_install_oslo_lib "oslo.context"
Sean Daguecc524062014-10-01 09:06:43 -040063 _do_install_oslo_lib "oslo.db"
Davanum Srinivas092c1242014-12-08 13:48:18 -050064 _do_install_oslo_lib "oslo.i18n"
65 _do_install_oslo_lib "oslo.log"
66 _do_install_oslo_lib "oslo.messaging"
67 _do_install_oslo_lib "oslo.middleware"
68 _do_install_oslo_lib "oslo.rootwrap"
69 _do_install_oslo_lib "oslo.serialization"
70 _do_install_oslo_lib "oslo.utils"
Sean Dagueb7cda382014-10-03 08:00:52 -040071 _do_install_oslo_lib "oslo.vmware"
Sean Daguecc524062014-10-01 09:06:43 -040072 _do_install_oslo_lib "pycadf"
73 _do_install_oslo_lib "stevedore"
74 _do_install_oslo_lib "taskflow"
Julien Danjouc187b882014-12-09 15:41:55 +010075 _do_install_oslo_lib "tooz"
Sean Daguedb5fadb2013-08-09 13:41:33 -040076}
77
Sean Dague1b6b5312013-07-31 06:46:34 -040078# Restore xtrace
79$XTRACE
80
Adam Spiers6a5aa7c2013-10-24 11:27:02 +010081# Tell emacs to use shell-script-mode
82## Local variables:
83## mode: shell-script
84## End: