On Nov 15, 2007, at 9:38 PM, Martin Aspeli wrote:

Hi all,

For fun, I just tried to make use of adapters and utilities, registered with ZCML, in a Pylons application.

I installed Pylons in a virtualenv, and easy_installed zope.component and zope.interface using the KGS index for 3.4. I used zope.configuration (also installed) to load a site.zcml, which currently just has:

        <configure xmlns="http://namespaces.zope.org/zope";>
                <include package="zope.component" file="meta.zcml" />
        </configure>

That doesn't work - it complains about not finding zope.security.zcml.

No idea why this happens, sorry.

Then I tried to easy_install zope.security, but this pulled in most of Zope, including the ZODB, ZConfig and zdaemon. That's a real shame - no CA (at least not with ZCML) without having pretty much all of Zope there. :(

Yup. Inappropriate dependency chain when you use the cheeseshop. See http://mail.zope.org/pipermail/zope-dev/2007-November/030276.html .

Actually, I never got to try it further, because this then died with:

Installed /Users/optilude/Development/Pylons/zylons/lib/python2.4/ site-packages/ZConfig-2.5-py2.4.egg error: Installed distribution zope.traversing 3.4.0 conflicts with requirement zope.traversing>=3.5.0a1.dev-r78730

If you're trying to installed these eggs using easy_install against the Cheeseshop, it won't work because the information in the setup.py of some eggs isn't the "whole story" about required versions of dependencies. Instead, some of version pinning information is stored in buildout.cfg (in a [versions] section) within these eggs. If you use buildout to install them, or use the KGS as the index URL to easy_install it will probably work. See http://mail.zope.org/pipermail/zope-dev/2007-November/030279.html (and actually the rest of that thread) for the whole story.

Are the Zope eggs ready for prime time?

Not quite. I've created a bot process which attempts to easy_install every distribution having to do with 'zope' from the cheeseshop into a clean virtualenv every few days. I'm hoping this, along with regular prodding from folks like you, will keep us on the right track going forward. See http://mail.zope.org/pipermail/zope-dev/2007-November/030271.html to see an example of the result of the bot.

Currently we're still quite broken for people trying to easy_install most zope-related eggs other than zope.interface, zope.component, and ZODB from the Cheeseshop. I asked for help fixing this the other day by asking if someone would remove a "bad" release from the Cheeseshop (I don't have the rights to do that) or by making new releases of eggs which pin versions in setup.py rather than in buildout.cfg (I don't feel qualified to do that, as I know little about the actual software and what impact that would have on people relying on the older version). No one has done it yet, though, I suppose.

In the meantime, I've fixed one package (zope.tal) to remove inappropriate dependencies, but a new release hasn't yet been made from the changes I checked in. Once it is, and it's been uploaded to the cheeseshop, you'll be able to install zope.pagetemplate without also getting ZODB and 74 other eggs. ;-) But I'm sure other packages need to get fixed too (in particular, zope.i18n, where things really go pear-shaped).

Maybe I should be doing it differently?

Please don't!  Just complain loudly. ;-)

I'm curious about how to go about this, since it seems like an incredibly useful thing to be able to do: Make use of the CA in a non-Zope Python application. :)

In the short term, you should be able to do either of the following:

   - use buildout to install the eggs

- use easy_install --index-url=http://download.zope.org/zope3.4 <distribution>

The first one will work due to version-pinning statements in the buildout.cfg of dependent eggs. The second one works because it doesn't find the "bad" distribution of zope.app.publisher that exists on the Cheeseshop that causes the later conflict. You'll still get a bunch of eggs you don't need, but at least they'll get installed.

- C

_______________________________________________
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )

Reply via email to