[Grok-dev] Problem with z3c.autoinclude of eggs in the Products namespace

Ethan Jucovy ejucovy at openplans.org
Sat Nov 22 14:16:45 EST 2008


Hey Vincent,

I don't know much about buildout or the inner workings of Five, so this is a
bit of a stab in the dark, but it sounds to me like package inclusion order
is the most likely culprit here.  As a quick sanity check, could you try
including the package directly, and see whether the problem remains the
same?  In src/myproject.policy/myproject/policy/configure.zcml, just change

<includeDependencies package="." />

to

<include package="Products.mypolicy" />

If my guess is correct that package inclusion order is somehow the cause,
then this shouldn't change any of the symptoms you're seeing.  That'll at
least be useful information to start debugging the problem.

Actually, though, do you need to explicitly include Products.mypolicy's ZCML
(whether directly or indirectly through z3c.autoinclude) at all?  Shouldn't
the <five:loadProducts /> directive in your site.zcml load
Products.mypolicy's ZCML files for you, before myproject.policy's ZCML is
even loaded?

Cheers,
Ethan

On Thu, Nov 6, 2008 at 7:29 AM, Vincent Fretin <vincent.fretin at gmail.com>wrote:

> Hi,
>
> I have two eggs myproject.policy and Products.myproject.
> I use z3c.autoinclude in my plone buildout like this:
>
> [buildout]
> versions = versions
> eggs = [...]
>    z3c.autoinclude
>    myproject.policy
> develop =
>    src/myproject.policy
>    src/Products.myproject
>
> [versions]
> z3c.autoinclude == 0.2.2
>
> [instance]
> zcml =
>   z3c.autoinclude-meta
>   myproject.policy
>
> If I put Products.myproject in eggs section. All works fine.
> But I don't want to put it in the buildout, but in setup.py of
> myproject.policy.
>
> In src/myproject.policy/myproject/policy/configure.zcml, I put:
> <includeDependencies package="." />
>
> I want myproject.policy to depend of Products.myproject,
> so I put in install_requires=['Products.myproject'] in
> src/myproject.policy/setup.py
>
> I start the zope instance.
> The product myproject is shown and installable in Plone control panel.
> But doesn't appear in ZMI Control_Panel/Products,
> the result is that factories for the various types in myproject
> product are not created.
>
> I think z3c.autoinclude blocks the normal Five machinery to take place.
> Any idea of the problem?
> Maybe you can just deactivate autoinclusion of eggs in the Products
> namespace in the next version?
>
> --
> Vincent Fretin
> _______________________________________________
> Grok-dev mailing list
> Grok-dev at zope.org
> http://mail.zope.org/mailman/listinfo/grok-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.zope.org/pipermail/grok-dev/attachments/20081122/21b98027/attachment.html 


More information about the Grok-dev mailing list