Commits

terapyon  committed d386834

adding config.py.in for buildout

  • Participants
  • Parent commits 3f0aa22

Comments (0)

Files changed (3)

File buildout.cfg

 parts = 
     index
     search
+    config
 versions = versions
 extends = versions.cfg
 
+codetmpdir = codetmp
+timestamp_ini = .timestamp.ini
+reps_cfg = reps.cfg
+sorl_url = http://localhost:8983/solr
+
+
 [index]
 recipe = zc.recipe.egg
 eggs = c2.solr.repsindexing
 recipe = zc.recipe.egg
 eggs = c2.solr.repssearching
 
+[config]
+recipe = collective.recipe.template
+input = templates/config.py.in
+output = conf/config.py
+
+mymessage = creating config.py

File conf/config.py

-#!/usr/bin/env python
-# encoding: utf-8
-"""
-config.py
-
-Created by Manabu TERADA on 2011-03-26.
-Copyright (c) 2011 CMScom. All rights reserved.
-"""
-import os
-
-base_path = os.path.join(os.path.dirname(__file__), 'codetmp')
-timestamp_file = '.timestamp.ini'
-reps_file = os.path.join(os.path.dirname(__file__)[:-1], 'reps.cfg')
-solr_url = 'http://localhost:8983/solr'
-

File templates/config.py.in

+#!/usr/bin/env python
+# encoding: utf-8
+"""
+config.py.py
+
+Created by Manabu TERADA on 2011-03-26.
+Copyright (c) 2011 CMScom. All rights reserved.
+"""
+import os
+
+# base_path = os.path.join(os.path.dirname(__file__), 'codetmp')
+# timestamp_file = '.timestamp.ini'
+# reps_file = os.path.join(os.path.dirname(__file__)[:-1], 'reps.cfg')
+# solr_url = 'http://localhost:8983/solr'
+
+base_path = os.path.join(os.path.dirname(__file__), '${buildout:codetmpdir}')
+timestamp_file = '${buildout:timestamp_ini}'
+reps_file = os.path.join(os.path.dirname(__file__)[:-1], '${buildout:reps_cfg}')
+solr_url = '${buildout:sorl_url}'