[Grok-dev] Autoincluding ZCML for package dependencies

Ethan Jucovy ejucovy at openplans.org
Wed Jan 23 12:55:37 EST 2008

On Jan 23, 2008 6:05 AM, Jeff Shell <eucci.group at gmail.com> wrote:
> And/or - the docs for autoinclude should include some other tips such
> as how to debug or inspect the choices made via 'debugzope'. Just some
> function that wrapped getting the distribution and returning the
> IncludeFinder results for a particular package/distro. Hell - such a
> function might be nice so that one could use z3c.autoinclude to
> generate a static list of includes if they want to take over explicit
> control; which could also be usable in buildout to generate a master
> site.zcml for production that is something a bit more physical which
> system administrators can see and tweak if necessary.

I've added something like this too now; let me know if it's what you
had in mind::

>>> pprint(package_includes('BCPackage'))
{'configure.zcml': ['F.H'], 'meta.zcml': ['testdirective', 'F.G', 'F.H']}

I think this should be all the info you need to construct either full
filepaths to required ZCML or all the <include> directives you'd need
to write to get the required packages.  Not sure if a module name like
"b.c" would be preferable as input rather than "BCPackage" but this
was a bit easier for me to figure out while trying to slog through
setuptools.  :P

Ethan Jucovy

More information about the Grok-dev mailing list