[Zope3-Users] Re: Moving from z3 tarball to z3 buildout/eggs

Derek Richardson derek.richardson at gatech.edu
Wed Sep 12 19:09:31 EDT 2007


Philipp von Weitershausen wrote:
> * If vice depends on the configuration of another package, but always 
> assumed that this package's configuration was being loaded by Zope 3.3's 
> site.zcml, make this dependency *explicit* now in vice's configure.zcml. 
> For example, let's say that vice needs the intid utility and event 
> subscriber registrations to be active, then it should do:
> 
>   <include package="zope.app.intid" />
> 
> at the top of vice/configure.zcml. This will probably add more explicit 
> depenencies to vice than you currently have (they should also go into 
> setup.py). Note that you won't have to worry about ZCML being loaded 
> several times. It won't be, zope.configuration makes sure of that.

OK, agreed, this is the *right* way. And thank you for the detailed instructions 
on how to achieve this - they are very clear and I plan to follow them closely.

One problem confronts me, though, before I do the boring work of sorting out the 
dependencies. My package is designed to run in both z2 and z3. So, I could add a 
bunch of z3-specific dependencies to a z3-configure.zcml that is loaded only if 
Five is not installed. Not too hard. But, the hard part is: I don't want to add 
all the z3 eggs to my setup.py, because that's ugly if I'm actually running in z2.

My idea is to have a z3-only package that depends on my z3/z2 hybrid package and 
that simply has a setup.py that includes all the z3 dependencies and a 
configure.zcml and an ftesting.zcml that does all the z3-specific zcml work. And 
then I can have a z3-specific buildout that uses the z3-specific package and 
another buildout for z2 that uses the base package and a third buildout for 
z2+plone, which includes some additional plone-specific packages. A big pain, 
but I want my code usuable in all three environments, to the extent that is 
possible.

Opinions?

Thanks,

Derek



More information about the Zope3-users mailing list