[Grok-dev] Re: z3c.widget.tiny, resourceLibrary and automatic load of resources

Martijn Faassen faassen at startifact.com
Tue Jan 15 11:55:45 EST 2008


Hey,

Dirceu Pereira Tiegs wrote:
[snip]
> Thanks for the info. Here is my final configure.zcml:
> 
> <configure xmlns="http://namespaces.zope.org/zope"
>           xmlns:grok="http://namespaces.zope.org/grok">
>  <include package="zope.app.component" file="meta.zcml" />
>  <include package="zope.app.pagetemplate" file="meta.zcml" />
>  <include package="zc.resourcelibrary" file="meta.zcml" />
>  <include package="zc.resourcelibrary" />
>  <include package="z3c.widget.tiny" />
>  <include package="grok" />
>  <grok:grok package="." />
> </configure>
> 
> Why all these packages?
[snip]
> 
> Is there a better way to do this?

Not really, but there *should* be.

Quoting myself from elsewhere in this thread:

 > One of the issues I'd like to solve at some state is automatic loading
 > of configure.zcml and meta.zcml when you include a package in your
 > setup.py dependencies.

Once this is set up, we can stop repeating ourselves. Right now we 
indicated inter-package dependency structure-related information in a 
number of places:

* Python import statements: from other import foo

* ZCML include statements: <include package="other" /> (also meta.zcml 
in some cases)

* setup.py package install_requires

* possibly buildout.cfg [versions] section to lock the versions into place

The ZCML include statement case looks like it's easiest to get rid of. 
After that we can see whether more magic is possible, but that'll be 
trickier.

Regards,

Martijn



More information about the Grok-dev mailing list