[Zope-dev] Re: zcml entry points

Tres Seaver tseaver at palladion.com
Wed Oct 17 22:56:11 EDT 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Wichert Akkerman wrote:
> A common issue we are seeing is that we have eggs depending on each
> other, but they still need to load the zcml from those dependencies
> somehow. As a temporary solution to play with the concept I added
> something simple to the plone.recipe.zope2instance buildout recipe.
> 
> It allows you to define entrypoints like this:
> 
>       entry_points={
>           "zope.zcml" : [
>               "meta = plone.session",
>               "configure = plone.session",
>           ],
>       },
> 
> this tells the system to load meta.zcml and configure.zcml from plone.session.
> 
> I am not quite sure what the best way to hook this into Zope itself is.
> For Zope 2 we can do it in Five, since that is where all the zcml loading
> logic currently is. Or we could move that into Zope2 itself somewhere.
> I'm not familiar enough with Zope3 to know what the best place would be there.
> 
> One problem is ordering: the zope.component zcml needs to be loaded first.

That's a packaging bug:  any package whose ZCML won't load without
having zope.component loaded already needs to add the explicit inclusion
(duplicates do *not* conflict for the <include> directive).

> Perhaps we need to build an egg dependency graph and walk through that
> to load zcml entry points in the right order. As long as all dependencies
> are registered correctly that should work.

I'd rather fix the ZCML files.


Tres.
- --
===================================================================
Tres Seaver          +1 540-429-0999          tseaver at palladion.com
Palladion Software   "Excellence by Design"    http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHFstL+gerLs4ltQ4RAnE+AKCeuEvcOW9P9BKMXJ0lJE5dxRtorwCfXgXO
Md2MbCD/PGIClJ/cvmJPeE4=
=Ti55
-----END PGP SIGNATURE-----



More information about the Zope-Dev mailing list