I wanted to share a bit of experience I just had with use of eggs in Zope2. For a project I am working on I want to use the zope.sendmail package in a Zope2 environment managed using buildout. I added zope.sendmail to the eggs list in the buildout configuration and ran buildout. This pulled in a large part of the Zope3 packages. This produced conflicts between those packages and the ones included in Zope2 which resulted in a pretty boken instance: [snow;..stances/revelation]-84> bin/instance test -s zope.sendmail Traceback (most recent call last): File "bin/instance", line 205, in ? plone.recipe.zope2instance.ctl.main( File "/local/buildout/eggs/plone.recipe.zope2instance-0.3-py2.4.egg/plone/recipe/zope2instance/ctl.py", line 154, in main c = AdjustedZopeCmd(options) File "/local/buildout/eggs/tmpCiQPa8/zdaemon-2.0a6-py2.4.egg/zdaemon/zdctl.py", line 141, in __init__ AttributeError: 'dict' object has no attribute 'mapping' Adding zope.sendmail as a develop egg instead of a normal egg worked fine though; no zope.* packages were pulled in by buildout and the zope.sendmail unittests run flawlessly. Wichert. -- Wichert Akkerman <wichert@wiggy.net> It is simple to make things. http://www.wiggy.net/ It is hard to make things simple.
Wichert Akkerman wrote:
I wanted to share a bit of experience I just had with use of eggs in Zope2. For a project I am working on I want to use the zope.sendmail package in a Zope2 environment managed using buildout. I added zope.sendmail to the eggs list in the buildout configuration and ran buildout. This pulled in a large part of the Zope3 packages. This produced conflicts between those packages and the ones included in Zope2 which resulted in a pretty boken instance:
easy_install has a --no-deps option. Maybe that's supported in buildout? Daniel
Previously Daniel Nouri wrote:
Wichert Akkerman wrote:
I wanted to share a bit of experience I just had with use of eggs in Zope2. For a project I am working on I want to use the zope.sendmail package in a Zope2 environment managed using buildout. I added zope.sendmail to the eggs list in the buildout configuration and ran buildout. This pulled in a large part of the Zope3 packages. This produced conflicts between those packages and the ones included in Zope2 which resulted in a pretty boken instance:
easy_install has a --no-deps option. Maybe that's supported in buildout?
That's a bit of a workaround though. Ideally Zope2 should be an egg which somehow tells buildout/setuptools that it also provides the various zope.* packages it includes at the moment. Similar to the providers-mechanism which packaging systems like dpkg and rpm implement perhaps. Provides and (semi-) virtual packages are going to be essential to deal with swappable components as well. Wichert. -- Wichert Akkerman <wichert@wiggy.net> It is simple to make things. http://www.wiggy.net/ It is hard to make things simple.
Wichert Akkerman wrote:
Previously Daniel Nouri wrote:
Wichert Akkerman wrote:
I wanted to share a bit of experience I just had with use of eggs in Zope2. For a project I am working on I want to use the zope.sendmail package in a Zope2 environment managed using buildout. I added zope.sendmail to the eggs list in the buildout configuration and ran buildout. This pulled in a large part of the Zope3 packages. This produced conflicts between those packages and the ones included in Zope2 which resulted in a pretty boken instance: easy_install has a --no-deps option. Maybe that's supported in buildout?
That's a bit of a workaround though.
It's a hack, yes.
Ideally Zope2 should be an egg which somehow tells buildout/setuptools that it also provides the various zope.* packages it includes at the moment. Similar to the providers-mechanism which packaging systems like dpkg and rpm implement perhaps. Provides and (semi-) virtual packages are going to be essential to deal with swappable components as well.
I didn't realize you were working *with* the Zope 2 egg that Philipp created. I don't have any experience with that, still what you're proposing makes much sense to me. Daniel
Previously Daniel Nouri wrote:
Wichert Akkerman wrote:
Previously Daniel Nouri wrote:
Wichert Akkerman wrote:
I wanted to share a bit of experience I just had with use of eggs in Zope2. For a project I am working on I want to use the zope.sendmail package in a Zope2 environment managed using buildout. I added zope.sendmail to the eggs list in the buildout configuration and ran buildout. This pulled in a large part of the Zope3 packages. This produced conflicts between those packages and the ones included in Zope2 which resulted in a pretty boken instance: easy_install has a --no-deps option. Maybe that's supported in buildout?
That's a bit of a workaround though.
It's a hack, yes.
Ideally Zope2 should be an egg which somehow tells buildout/setuptools that it also provides the various zope.* packages it includes at the moment. Similar to the providers-mechanism which packaging systems like dpkg and rpm implement perhaps. Provides and (semi-) virtual packages are going to be essential to deal with swappable components as well.
I didn't realize you were working *with* the Zope 2 egg that Philipp created. I don't have any experience with that, still what you're proposing makes much sense to me.
I'm not, but with eggs that should be possible. Ideally. Wichert. -- Wichert Akkerman <wichert@wiggy.net> It is simple to make things. http://www.wiggy.net/ It is hard to make things simple.
Wichert Akkerman wrote:
I wanted to share a bit of experience I just had with use of eggs in Zope2. For a project I am working on I want to use the zope.sendmail package in a Zope2 environment managed using buildout. I added zope.sendmail to the eggs list in the buildout configuration and ran buildout. This pulled in a large part of the Zope3 packages. This produced conflicts between those packages and the ones included in Zope2 which resulted in a pretty boken instance:
[snow;..stances/revelation]-84> bin/instance test -s zope.sendmail Traceback (most recent call last): File "bin/instance", line 205, in ? plone.recipe.zope2instance.ctl.main( File "/local/buildout/eggs/plone.recipe.zope2instance-0.3-py2.4.egg/plone/recipe/zope2instance/ctl.py", line 154, in main c = AdjustedZopeCmd(options) File "/local/buildout/eggs/tmpCiQPa8/zdaemon-2.0a6-py2.4.egg/zdaemon/zdctl.py", line 141, in __init__ AttributeError: 'dict' object has no attribute 'mapping'
You're dealing with two major problems here: * It looks like zdaemon has changed in an incompatible way from whichever version your Zope 2 ships with (you don't mention your Zope 2 version, btw) to 2.0a6. That isn't the only problem, btw. The ZODB 3.8, which as likely been pulled in as an egg too, also contains a couple of incompatible changes. * Many of the zope.* packages have way too many dependencies right now. I really hope that we can cut those inter-dependencies down so that easy_installing one of them doesn't get you the whole tree. For example, the zope.sendmail needs the ZODB for the 'transaction' package (it registers its own data managers), but it doesn't really need the ZODB. It only needs the common transaction mechanism. If that were available separately, for instance, upgrading to a newer egg would be much less disturbing. Your wanting to upgrade zope.sendmail does re-iterate one of my points, though: That it *is* a valid use case to exchange a single package for a newer, improved version (as it is the case here). While having a well-defined distribution of Zope (that contains specific versions of all packages) is absolutely good to have, I think being able to upgrade certain eggs (when needed) is very valuable.
Adding zope.sendmail as a develop egg instead of a normal egg worked fine though; no zope.* packages were pulled in by buildout and the zope.sendmail unittests run flawlessly.
What do you mean by develop egg? Just a checkout? Or did you actually call setup.py develop, because that should also pull in dependencies. -- http://worldcookery.com -- Professional Zope documentation and training
Previously Philipp von Weitershausen wrote:
Wichert Akkerman wrote:
I wanted to share a bit of experience I just had with use of eggs in Zope2. For a project I am working on I want to use the zope.sendmail package in a Zope2 environment managed using buildout. I added zope.sendmail to the eggs list in the buildout configuration and ran buildout. This pulled in a large part of the Zope3 packages. This produced conflicts between those packages and the ones included in Zope2 which resulted in a pretty boken instance:
[snow;..stances/revelation]-84> bin/instance test -s zope.sendmail Traceback (most recent call last): File "bin/instance", line 205, in ? plone.recipe.zope2instance.ctl.main( File "/local/buildout/eggs/plone.recipe.zope2instance-0.3-py2.4.egg/plone/recipe/zope2instance/ctl.py", line 154, in main c = AdjustedZopeCmd(options) File "/local/buildout/eggs/tmpCiQPa8/zdaemon-2.0a6-py2.4.egg/zdaemon/zdctl.py", line 141, in __init__ AttributeError: 'dict' object has no attribute 'mapping'
You're dealing with two major problems here:
* It looks like zdaemon has changed in an incompatible way from whichever version your Zope 2 ships with (you don't mention your Zope 2 version, btw) to 2.0a6. That isn't the only problem, btw. The ZODB 3.8, which as likely been pulled in as an egg too, also contains a couple of incompatible changes.
Zope 2.10.3-final
Adding zope.sendmail as a develop egg instead of a normal egg worked fine though; no zope.* packages were pulled in by buildout and the zope.sendmail unittests run flawlessly.
What do you mean by develop egg? Just a checkout? Or did you actually call setup.py develop, because that should also pull in dependencies.
That was me not understanding buildout fully and forgetting to add the egg to the instance recipe properly. You are correct: all dependencies are pulled in. At the moment my options seem to be to not use buildout or modifying setup.py in zope.sendmail to remove all its declared dependencies. Wichert. -- Wichert Akkerman <wichert@wiggy.net> It is simple to make things. http://www.wiggy.net/ It is hard to make things simple.
Wichert Akkerman wrote:
At the moment my options seem to be to not use buildout or modifying setup.py in zope.sendmail to remove all its declared dependencies.
More like "not to use setuptools", i.e. any egg-based solution would have the same problem (e.g. workingenv). You can probably check it out into parts/instance/lib/python or somewhere else on the pythonpath, to get just that one package, but it kinda defeats the point. Martin -- Acquisition is a jealous mistress
participants (4)
-
Daniel Nouri -
Martin Aspeli -
Philipp von Weitershausen -
Wichert Akkerman