4 Aug
2010
4 Aug
'10
9:20 a.m.
On Wed, Aug 4, 2010 at 11:13 AM, Chris Withers <chris@simplistix.co.uk> wrote:
Okay, but what about:
<include package="Products.Whatever" />
...causes Whatever/__init__.py's initialize method to get called?
Yes. Eggified products behave in the same way as code dumped into one of the "products" directories. If you have a package, which isn't in the "Products" namespace and still want its initialize to be called, you need to add some bits to your configure.zcml: <five:registerPackage package="." initialize=".initialize" />
Yeah, but it's setuptools namespace packages magic that makes sure __path__, which the old Zope 2 code iterates over, is set up correctly, right?
Sure. Hanno