Downsides of moving from Products to lib/python?

Maurits van Rees m.van.rees at
Mon Aug 27 16:32:00 UTC 2007

Martin Aspeli, on 2007-08-25:
> Maurits van Rees wrote:
>>    - I heard ploneout does some hacking to the path to make sure these
>>      zcmls in lib/python get loaded too.
> Nope.
> But the plone.recipe.zope2instance recipe (like it's zope 3 equivalent) 
> has an option 'zcml' where you can list package names for which ZCML 
> slugs get installed automatically. This is not a hack. :)

Mu information was wrong then.  It looks like buildout does this
correctly and in a non-hackish way.

>>    - You can put zcml "slugs" (one-liners) in etc/site.zcml or
>>      etc/package-includes/
> The approach I prefer and advocate is to have *one* slug for a "policy" 
> product (Wichert calls this a "deployment product"). This has a 
> configure.zcml that includes other dependencies as and when needed. It 
> also has an installation step that installs other packages as 
> dependencies when the policy is installed from the quickinstaller.

I ususally also make some setup Product that makes sure all
QuickInstaller and GenericSetup dependencies are installed, skin
layers are ordered correctly, etc.  Making this one also responsible
for loading the zcml files of its dependent python packages seems
logical yes.

>> B. Are there more of these gotchas that developers should know?
> When writing tests for packages that are also Zope 2 products, you can't 
> use ZopeTestCase.installProduct('my.package'); the pattern I prefer is 
> as follows:

Nice, thanks for sharing.  I will keep that in mind.

Maurits van Rees | [NL]
            Work |
"Do not worry about your difficulties in computers,
 I can assure you mine are still greater."

More information about the Product-Developers mailing list