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="" />

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 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, 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 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.




Zope3-users mailing list

Reply via email to