[Zope-dev] Products in Zope 2.12+

2010-08-04 Thread Chris Withers
Hi All, I'm in the process of egg-ifying some Zope 2 Products of mine (first up is MailTemplates) and I'm curious as to how add-in products work in an egg-based Zope setup. Do I need to include anything in zope.conf or some zcml somewhere? If not how are products picked up? Where can I find

Re: [Zope-dev] Products in Zope 2.12+

2010-08-04 Thread Hanno Schlichting
Hi. On Wed, Aug 4, 2010 at 10:31 AM, Chris Withers ch...@simplistix.co.uk wrote: I'm in the process of egg-ifying some Zope 2 Products of mine (first up is MailTemplates) and I'm curious as to how add-in products work in an egg-based Zope setup. Do I need to include anything in zope.conf or

Re: [Zope-dev] Products in Zope 2.12+

2010-08-04 Thread Chris Withers
Hanno Schlichting wrote: For a general Python package to be picked up, you would need to add a regular ZCML slug into the etc/package-includes directory of your instance. What does a regular ZCML slug look like? If your package is a namespace package in the 'Products' namespace, then it

Re: [Zope-dev] Products in Zope 2.12+

2010-08-04 Thread Jens Vagelpohl
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 8/4/10 10:52 , Hanno Schlichting wrote: Hi. On Wed, Aug 4, 2010 at 10:31 AM, Chris Withers ch...@simplistix.co.uk wrote: I'm in the process of egg-ifying some Zope 2 Products of mine (first up is MailTemplates) and I'm curious as to how

Re: [Zope-dev] Products in Zope 2.12+

2010-08-04 Thread Charlie Clark
Am 04.08.2010, 10:56 Uhr, schrieb Jens Vagelpohl j...@dataflake.org: In essence: If your egg is in the Products namespace you don't need to do anything after adding it e.g. to the list of eggs for a Zope instance in your buildout.cfg. The product will be recognized, installed, and any

Re: [Zope-dev] Products in Zope 2.12+

2010-08-04 Thread Hanno Schlichting
On Wed, Aug 4, 2010 at 10:55 AM, Chris Withers ch...@simplistix.co.uk wrote: What does a regular ZCML slug look like? My first Google hit is this http://worldcookery.com/files/ploneconf05-five/step2.html :) Is this setuptools namespace package magic making things work or is there explicit

Re: [Zope-dev] Products in Zope 2.12+

2010-08-04 Thread Baiju M
On Wed, Aug 4, 2010 at 2:33 PM, Charlie Clark charlie.cl...@clark-consulting.eu wrote: Am 04.08.2010, 10:56 Uhr, schrieb Jens Vagelpohl j...@dataflake.org: In essence: If your egg is in the Products namespace you don't need to do anything after adding it e.g. to the list of eggs for a Zope

Re: [Zope-dev] Products in Zope 2.12+

2010-08-04 Thread Chris Withers
Hanno Schlichting wrote: On Wed, Aug 4, 2010 at 10:55 AM, Chris Withers ch...@simplistix.co.uk wrote: What does a regular ZCML slug look like? My first Google hit is this http://worldcookery.com/files/ploneconf05-five/step2.html :) yeah yeah... Okay, but what about: include

Re: [Zope-dev] Products in Zope 2.12+

2010-08-04 Thread Baiju M
On Wed, Aug 4, 2010 at 2:45 PM, Chris Withers ch...@simplistix.co.uk wrote: Baiju M wrote: zcml = simplistix.MailTemplates to your instance configuration and you're good. There is an assumption that plone.recipe.zope2instance [1] is used to create instances from Buildout. yes, which it

Re: [Zope-dev] Products in Zope 2.12+

2010-08-04 Thread Hanno Schlichting
On Wed, Aug 4, 2010 at 11:13 AM, Chris Withers ch...@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

Re: [Zope-dev] Products in Zope 2.12+

2010-08-04 Thread Chris Withers
Hanno Schlichting wrote: 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 / Right, that's the bit I was after :-) Chris --

Re: [Zope-dev] Products in Zope 2.12+

2010-08-04 Thread Charlie Clark
Am 04.08.2010, 11:15 Uhr, schrieb Chris Withers ch...@simplistix.co.uk: yes, which it isn't for me, since it's evil and I'm not using Plone Well, I said it was the idiot's guide... As you know, I don't use Plone either. I'm also evil but in a different way! The recipe just sets up a Zope 2

Re: [Zope-dev] Products in Zope 2.12+

2010-08-04 Thread Chris Withers
Charlie Clark wrote: As you know, I don't use Plone either. I'm also evil but in a different way! The recipe just sets up a Zope 2 instance, which I believe is a bit tricky to work on all platforms. It's a piece of piss and needs no special recipes: