[Checkins] SVN: z3c.autoinclude/trunk/src/z3c/autoinclude/ more minor cleanups
Ethan Jucovy
ejucovy at openplans.org
Sat Jan 17 14:44:37 EST 2009
Log message for revision 94808:
more minor cleanups
Changed:
U z3c.autoinclude/trunk/src/z3c/autoinclude/dependency.py
U z3c.autoinclude/trunk/src/z3c/autoinclude/zcml.py
-=-
Modified: z3c.autoinclude/trunk/src/z3c/autoinclude/dependency.py
===================================================================
--- z3c.autoinclude/trunk/src/z3c/autoinclude/dependency.py 2009-01-17 19:32:26 UTC (rev 94807)
+++ z3c.autoinclude/trunk/src/z3c/autoinclude/dependency.py 2009-01-17 19:44:37 UTC (rev 94808)
@@ -3,11 +3,8 @@
from pkg_resources import resource_exists
from pkg_resources import get_provider
from pkg_resources import get_distribution
-import logging
from z3c.autoinclude.utils import DistributionManager
-log = logging.getLogger("z3c.autoinclude")
-
class DependencyFinder(DistributionManager):
def includableInfo(self, include_candidates):
"""Return the packages in the dependencies which are includable.
Modified: z3c.autoinclude/trunk/src/z3c/autoinclude/zcml.py
===================================================================
--- z3c.autoinclude/trunk/src/z3c/autoinclude/zcml.py 2009-01-17 19:32:26 UTC (rev 94807)
+++ z3c.autoinclude/trunk/src/z3c/autoinclude/zcml.py 2009-01-17 19:44:37 UTC (rev 94808)
@@ -57,36 +57,40 @@
package = GlobalObject(
title=u"Package to auto-include for",
description=u"""
- Auto-include all dependencies of this package.
+ Auto-include all plugins to this package.
""",
required=True,
)
file = TextLine(
title=u"ZCML filename to look for",
- description=u"Name of a particular ZCML file to look for; if omitted, autoinclude will scan for standard filenames",
+ description=u"""
+ Name of a particular ZCML file to look for.
+ If omitted, autoinclude will scan for standard filenames
+ (e.g. meta.zcml, configure.zcml, overrides.zcml)
+ """,
required=False,
)
def includePluginsDirective(_context, package, file=None):
dotted_name = package.__name__
if file is None:
- zcml_candidates = ['meta.zcml', 'configure.zcml']
+ zcml_to_look_for = ['meta.zcml', 'configure.zcml']
else:
- zcml_candidates = [file]
- info = PluginFinder(dotted_name).includableInfo(zcml_candidates)
+ zcml_to_look_for = [file]
+ info = PluginFinder(dotted_name).includableInfo(zcml_to_look_for)
- for filename in zcml_candidates:
+ for filename in zcml_to_look_for:
includeZCMLGroup(_context, info, filename)
def includePluginsOverridesDirective(_context, package, file=None):
dotted_name = package.__name__
if file is None:
- zcml_candidates = ['overrides.zcml']
+ zcml_to_look_for = ['overrides.zcml']
else:
- zcml_candidates = [file]
- info = PluginFinder(dotted_name).includableInfo(zcml_candidates)
+ zcml_to_look_for = [file]
+ info = PluginFinder(dotted_name).includableInfo(zcml_to_look_for)
- for filename in zcml_candidates:
+ for filename in zcml_to_look_for:
includeZCMLGroup(_context, info, filename, override=True)
More information about the Checkins
mailing list