diff options
author | Ghe Rivero <ghe.rivero@hp.com> | 2014-07-31 12:27:08 +0000 |
---|---|---|
committer | Ghe Rivero <ghe.rivero@hp.com> | 2014-08-05 22:28:25 +0000 |
commit | 689052700c74fdc19c116641eb22df04a42f817f (patch) | |
tree | 8aca7a7cf5642a23f71af5ef6eab9dba83d81fa0 /tools | |
parent | 5d4d79fbd1651a5285bf7334a71245b40585cef5 (diff) | |
download | ironic-689052700c74fdc19c116641eb22df04a42f817f.tar.gz |
Sync oslo.incubator modules
Update the openstack.common modules from oslo.incubator
to have a current copy needed to start using new released
oslo libraries.
Change-Id: I60ea98b3381cbbc3d2905af224792ee68b423825
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/config/check_uptodate.sh | 4 | ||||
-rwxr-xr-x | tools/config/generate_sample.sh | 21 | ||||
-rw-r--r-- | tools/install_venv_common.py | 10 |
3 files changed, 29 insertions, 6 deletions
diff --git a/tools/config/check_uptodate.sh b/tools/config/check_uptodate.sh index aa370438d..392a08b77 100755 --- a/tools/config/check_uptodate.sh +++ b/tools/config/check_uptodate.sh @@ -16,6 +16,10 @@ TEMPDIR=`mktemp -d /tmp/${PROJECT_NAME}.XXXXXX` trap "rm -rf $TEMPDIR" EXIT tools/config/generate_sample.sh -b ./ -p ${PROJECT_NAME} -o ${TEMPDIR} +if [ $? != 0 ] +then + exit 1 +fi if ! diff -u ${TEMPDIR}/${CFGFILE_NAME} ${CFGFILE} then diff --git a/tools/config/generate_sample.sh b/tools/config/generate_sample.sh index 36cc3f264..99b46aa66 100755 --- a/tools/config/generate_sample.sh +++ b/tools/config/generate_sample.sh @@ -1,5 +1,15 @@ #!/usr/bin/env bash +# Generate sample configuration for your project. +# +# Aside from the command line flags, it also respects a config file which +# should be named oslo.config.generator.rc and be placed in the same directory. +# +# You can then export the following variables: +# IRONIC_CONFIG_GENERATOR_EXTRA_MODULES: list of modules to interrogate for options. +# IRONIC_CONFIG_GENERATOR_EXTRA_LIBRARIES: list of libraries to discover. +# IRONIC_CONFIG_GENERATOR_EXCLUDED_FILES: list of files to remove from automatic listing. + print_hint() { echo "Try \`${0##*/} --help' for more information." >&2 } @@ -65,7 +75,7 @@ then BASEDIR=$(cd "$BASEDIR" && pwd) fi -PACKAGENAME=${PACKAGENAME:-${BASEDIR##*/}} +PACKAGENAME=${PACKAGENAME:-$(python setup.py --name)} TARGETDIR=$BASEDIR/$PACKAGENAME if ! [ -d $TARGETDIR ] then @@ -95,6 +105,10 @@ then source "$RC_FILE" fi +for filename in ${IRONIC_CONFIG_GENERATOR_EXCLUDED_FILES}; do + FILES="${FILES[@]/$filename/}" +done + for mod in ${IRONIC_CONFIG_GENERATOR_EXTRA_MODULES}; do MODULES="$MODULES -m $mod" done @@ -111,6 +125,11 @@ DEFAULT_MODULEPATH=ironic.openstack.common.config.generator MODULEPATH=${MODULEPATH:-$DEFAULT_MODULEPATH} OUTPUTFILE=$OUTPUTDIR/$PACKAGENAME.conf.sample python -m $MODULEPATH $MODULES $LIBRARIES $FILES > $OUTPUTFILE +if [ $? != 0 ] +then + echo "Can not generate $OUTPUTFILE" + exit 1 +fi # Hook to allow projects to append custom config file snippets CONCAT_FILES=$(ls $BASEDIR/tools/config/*.conf.sample 2>/dev/null) diff --git a/tools/install_venv_common.py b/tools/install_venv_common.py index 3e8c1e4a8..e279159ab 100644 --- a/tools/install_venv_common.py +++ b/tools/install_venv_common.py @@ -112,12 +112,12 @@ class InstallVenv(object): print('Installing dependencies with pip (this can take a while)...') # First things first, make sure our venv has the latest pip and - # setuptools. - self.pip_install('pip>=1.3') + # setuptools and pbr + self.pip_install('pip>=1.4') self.pip_install('setuptools') + self.pip_install('pbr') - self.pip_install('-r', self.requirements) - self.pip_install('-r', self.test_requirements) + self.pip_install('-r', self.requirements, '-r', self.test_requirements) def parse_args(self, argv): """Parses command-line arguments.""" @@ -125,7 +125,7 @@ class InstallVenv(object): parser.add_option('-n', '--no-site-packages', action='store_true', help="Do not inherit packages from global Python " - "install") + "install.") return parser.parse_args(argv[1:])[0] |