Preferred non-Products Initialization Approach?
In my reading I can see there are two ways to initialize a Product that is not sitting in the Products directory: 1. use ZCML with the five:registerPackage directive 2. declare in setup.py a "zope2.products" entrypoint Which is the preferred way these days? Is there a subtle difference? In particular I'm having trouble with an Extensions/ subdirectory of the Product -not- being found in an import stmt when I moved it outside the Products directory. -Jeff
On 01/27/2011 06:34 AM, Jeff Rush wrote:
In my reading I can see there are two ways to initialize a Product that is not sitting in the Products directory:
1. use ZCML with the five:registerPackage directive
2. declare in setup.py a "zope2.products" entrypoint
Which is the preferred way these days? Is there a subtle difference?
Hmm, there seems to be a third way that some packages use: 3. declare your egg to be a 'Products' namespace package, omit any entrypoint or registerPackage declarations and rely upon setuptools splicing you into the Products.__path__ list and being found the conventional way of scanning the (virtual) Products namespace. BTW, I'm working with Zope 2.12.10, and I'm not finding -any- code that searches for a zope2.initialize or zope2.products entrypoint - seems to be a NOP. -Jeff
participants (1)
-
Jeff Rush