summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorZhongyue Luo <zhongyue.nah@intel.com>2013-07-17 12:45:32 +0900
committerZhongyue Luo <zhongyue.nah@intel.com>2013-07-22 20:49:23 +0900
commit8667c73dbededde1629dbcff4d6760f44cf2547b (patch)
tree3b6acbd3fba97372187d20f1163f931e71b247f3 /tools
parent4cd94cd7633eb18c6928eef6ad3db1ac4ed4d406 (diff)
downloadoslo-8667c73dbededde1629dbcff4d6760f44cf2547b.tar.gz
oslo-8667c73dbededde1629dbcff4d6760f44cf2547b.tar.xz
oslo-8667c73dbededde1629dbcff4d6760f44cf2547b.zip
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
Diffstat (limited to 'tools')
-rwxr-xr-xtools/config/generate_sample.sh4
1 files changed, 2 insertions, 2 deletions
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