[Checkins]
SVN: zc.recipe.zope3instance/branches/gocept-zconf-slug-dev/src/zc/recipe/zope3instance/
- fixed zdaemon skeleton
Christian Theune
ct at gocept.com
Wed Dec 6 15:33:11 EST 2006
Log message for revision 71466:
- fixed zdaemon skeleton
- fixed zope3 path validation
Changed:
U zc.recipe.zope3instance/branches/gocept-zconf-slug-dev/src/zc/recipe/zope3instance/__init__.py
U zc.recipe.zope3instance/branches/gocept-zconf-slug-dev/src/zc/recipe/zope3instance/skel/zdaemon.conf.in
-=-
Modified: zc.recipe.zope3instance/branches/gocept-zconf-slug-dev/src/zc/recipe/zope3instance/__init__.py
===================================================================
--- zc.recipe.zope3instance/branches/gocept-zconf-slug-dev/src/zc/recipe/zope3instance/__init__.py 2006-12-06 20:10:21 UTC (rev 71465)
+++ zc.recipe.zope3instance/branches/gocept-zconf-slug-dev/src/zc/recipe/zope3instance/__init__.py 2006-12-06 20:33:11 UTC (rev 71466)
@@ -59,8 +59,7 @@
def install(self):
options = self.options
- z3path = options['zope3-location']
- self._validateZ3Path(z3path)
+ z3path = self._validateZ3Path(options['zope3-location'])
extra = options.get('extra-paths')
if extra:
@@ -79,7 +78,8 @@
options[dir] = dest
requirements, ws = self.egg.working_set()
- # XXX In theory we could just delete the parts directory here. Or not?
+ # XXX In theory we could just delete the parts directory here, if it
+ # exists already. Or not?
os.mkdir(dest)
options['site_zcml_path'] = os.path.join(options['config_dir'], 'site.zcml')
@@ -179,11 +179,12 @@
file(new_name, 'w').write(new_contents)
os.remove(in_file)
- def update(self):
- pass
+ def _validateZ3Path(self, path):
+ """Validate that a given absolute path is a Zope 3 installation or checkout.
- def _validateZ3Path(self, path):
- """Validate that a given absolute path is a Zope 3 installation or checkout."""
+ Return the path that should be added to the PYTHONPATH for the generated
+ scripts.
+ """
def fail():
logger.error(
"The directory, %r, isn't a valid checkout or release."
@@ -196,7 +197,8 @@
# Check that either lib/python or src/ exists.
choices = [('lib', 'python'), ('src',)]
- valid_paths = filter(lambda x: os.path.exists(os.path.join(path, *x)), choices)
+ choices = map(lambda x:os.path.join(path, *x), choices)
+ valid_paths = filter(os.path.exists, choices)
if not valid_paths:
fail()
@@ -204,3 +206,4 @@
skel = os.path.join(path, 'zopeskel', 'etc')
if not os.path.exists(skel):
fail()
+ return valid_paths[0]
Modified: zc.recipe.zope3instance/branches/gocept-zconf-slug-dev/src/zc/recipe/zope3instance/skel/zdaemon.conf.in
===================================================================
--- zc.recipe.zope3instance/branches/gocept-zconf-slug-dev/src/zc/recipe/zope3instance/skel/zdaemon.conf.in 2006-12-06 20:10:21 UTC (rev 71465)
+++ zc.recipe.zope3instance/branches/gocept-zconf-slug-dev/src/zc/recipe/zope3instance/skel/zdaemon.conf.in 2006-12-06 20:33:11 UTC (rev 71466)
@@ -14,4 +14,3 @@
path %(log_dir)s/z3.log
</logfile>
</eventlog>
-"""
More information about the Checkins
mailing list