From 8667c73dbededde1629dbcff4d6760f44cf2547b Mon Sep 17 00:00:00 2001 From: Zhongyue Luo Date: Wed, 17 Jul 2013 12:45:32 +0900 Subject: Import config file generator module from python path The sample config file generator will be executed in each project's virtualenv after being copied using the update.py module. Therefore accessing the generator module would not work the current way of using relative paths. This patch executes the generator module by directly importing it. The update.py will update the module path when copying to each project. Change-Id: Id40422ae170935d2fc1c7443eee4b31161b7d3d3 --- tools/config/generate_sample.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tools') diff --git a/tools/config/generate_sample.sh b/tools/config/generate_sample.sh index 916d928..26f02dd 100755 --- a/tools/config/generate_sample.sh +++ b/tools/config/generate_sample.sh @@ -64,6 +64,6 @@ FILES=$(find $BASEDIR/$PACKAGENAME -type f -name "*.py" ! -path "*/tests/*" \ export EVENTLET_NO_GREENDNS=yes -MODULEPATH=$(dirname "$0")/../../openstack/common/config/generator.py +MODULEPATH=openstack.common.config.generator OUTPUTFILE=$OUTPUTDIR/$PACKAGENAME.conf.sample -PYTHONPATH=$BASEDIR/:${PYTHONPATH} python $MODULEPATH $FILES > $OUTPUTFILE +python -m $MODULEPATH $FILES > $OUTPUTFILE -- cgit