blob: d9688a01cd9004fea6fab83a852e7e4e17b1ddca [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# --------
Sean Daguecc524062014-10-01 09:06:43 -040025GITDIR["cliff"]=$DEST/cliff
Joshua Harlowee9064b2015-02-19 15:06:23 -080026GITDIR["debtcollector"]=$DEST/debtcollector
Sean Daguecc524062014-10-01 09:06:43 -040027GITDIR["oslo.concurrency"]=$DEST/oslo.concurrency
Davanum Srinivas092c1242014-12-08 13:48:18 -050028GITDIR["oslo.config"]=$DEST/oslo.config
Davanum Srinivas958111e2014-11-17 17:35:40 -050029GITDIR["oslo.context"]=$DEST/oslo.context
Sean Daguecc524062014-10-01 09:06:43 -040030GITDIR["oslo.db"]=$DEST/oslo.db
31GITDIR["oslo.i18n"]=$DEST/oslo.i18n
32GITDIR["oslo.log"]=$DEST/oslo.log
Sean Daguecc524062014-10-01 09:06:43 -040033GITDIR["oslo.messaging"]=$DEST/oslo.messaging
Davanum Srinivas092c1242014-12-08 13:48:18 -050034GITDIR["oslo.middleware"]=$DEST/oslo.middleware
Steve Martinelli20b027b2015-02-04 02:38:13 -050035GITDIR["oslo.policy"]=$DEST/oslo.policy
Sean Daguecc524062014-10-01 09:06:43 -040036GITDIR["oslo.rootwrap"]=$DEST/oslo.rootwrap
37GITDIR["oslo.serialization"]=$DEST/oslo.serialization
38GITDIR["oslo.utils"]=$DEST/oslo.utils
Dan Smithaca8a7f2015-03-03 08:50:27 -080039GITDIR["oslo.versionedobjects"]=$DEST/oslo.versionedobjects
Sean Daguecc524062014-10-01 09:06:43 -040040GITDIR["oslo.vmware"]=$DEST/oslo.vmware
41GITDIR["pycadf"]=$DEST/pycadf
42GITDIR["stevedore"]=$DEST/stevedore
43GITDIR["taskflow"]=$DEST/taskflow
Julien Danjouc187b882014-12-09 15:41:55 +010044GITDIR["tooz"]=$DEST/tooz
Sean Dague1b6b5312013-07-31 06:46:34 -040045
Elena Ezhova2d451962014-06-19 12:49:32 +040046# Support entry points installation of console scripts
47OSLO_BIN_DIR=$(get_python_exec_prefix)
48
Dean Troyerdc97cb72015-03-28 08:20:50 -050049
50# Functions
51# ---------
Sean Dague1b6b5312013-07-31 06:46:34 -040052
Sean Daguecc524062014-10-01 09:06:43 -040053function _do_install_oslo_lib {
54 local name=$1
55 if use_library_from_git "$name"; then
56 git_clone_by_name "$name"
57 setup_lib "$name"
58 fi
59}
60
Sean Dague1b6b5312013-07-31 06:46:34 -040061# install_oslo() - Collect source and prepare
Ian Wienandaee18c72014-02-21 15:35:08 +110062function install_oslo {
Sean Daguecc524062014-10-01 09:06:43 -040063 _do_install_oslo_lib "cliff"
Joshua Harlowee9064b2015-02-19 15:06:23 -080064 _do_install_oslo_lib "debtcollector"
Sean Daguecc524062014-10-01 09:06:43 -040065 _do_install_oslo_lib "oslo.concurrency"
Davanum Srinivas092c1242014-12-08 13:48:18 -050066 _do_install_oslo_lib "oslo.config"
67 _do_install_oslo_lib "oslo.context"
Sean Daguecc524062014-10-01 09:06:43 -040068 _do_install_oslo_lib "oslo.db"
Davanum Srinivas092c1242014-12-08 13:48:18 -050069 _do_install_oslo_lib "oslo.i18n"
70 _do_install_oslo_lib "oslo.log"
71 _do_install_oslo_lib "oslo.messaging"
72 _do_install_oslo_lib "oslo.middleware"
Steve Martinelli20b027b2015-02-04 02:38:13 -050073 _do_install_oslo_lib "oslo.policy"
Davanum Srinivas092c1242014-12-08 13:48:18 -050074 _do_install_oslo_lib "oslo.rootwrap"
75 _do_install_oslo_lib "oslo.serialization"
76 _do_install_oslo_lib "oslo.utils"
Dan Smithaca8a7f2015-03-03 08:50:27 -080077 _do_install_oslo_lib "oslo.versionedobjects"
Sean Dagueb7cda382014-10-03 08:00:52 -040078 _do_install_oslo_lib "oslo.vmware"
Sean Daguecc524062014-10-01 09:06:43 -040079 _do_install_oslo_lib "pycadf"
80 _do_install_oslo_lib "stevedore"
81 _do_install_oslo_lib "taskflow"
Julien Danjouc187b882014-12-09 15:41:55 +010082 _do_install_oslo_lib "tooz"
Sean Daguedb5fadb2013-08-09 13:41:33 -040083}
84
Sean Dague1b6b5312013-07-31 06:46:34 -040085# Restore xtrace
86$XTRACE
87
Adam Spiers6a5aa7c2013-10-24 11:27:02 +010088# Tell emacs to use shell-script-mode
89## Local variables:
90## mode: shell-script
91## End: