[Grok-dev] Re: solving buildout problems - pinning down eggs

Philipp von Weitershausen philipp at weitershausen.de
Thu Sep 20 16:42:43 EDT 2007


Jan-Wijbrand Kolman wrote:
> Since we were in a hurry, we didn't give ourselves enough time to really 
> dig into the cause of the failures (most of'em were version conflicts, 
> or things like pulling in zope packages of some 3.5(!) alpha version, or 
> lxml 2.0a that broke something somehow on OS X, etc.).

Part of the problem is that we're not yet using the prefer-final flag in 
buildout. The problem is that it doesn't really make a difference right 
now because most eggs aren't yet final, so a 3.4.0b2 and 3.5.0a1 version 
of the same egg will both look like development versions to buildout, so 
it will never prefer the 3.4.x one, even though we'd like that.

I really hope we can soon get towards stable eggs. Anybody's welcome to 
help out. http://wiki.zope.org/zope3/StabilizeEggPackages

> At that point we just started semi-randomly throwing away eggs from the 
> egg cache,

You shouldn't have to do that.

> pinning versions in our package's setup.py, etc. etc.

When you're using buildout, you don't have to do that either. Though you 
can, obviously.

> * What is the best way of dealing with a version conflict, if it happens?

Usually a conflict occurs because setuptools/buildout isn't smart 
enough. Let's say one package depends on the ZODB3 without any version 
requirement and another package also depends on the ZODB3, but with a 
specific version. In the first case, buildout will download the newest 
ZODB3 version it can find (that's the usual behaviour). Then it'll 
download the version that second package depends on, and voila, you have 
a conflict.

Pinning egg versions down using buildout's version mechanism helps in 
this case.

> * Is an egg cache really that helpful (besides saving bandwidth)? And is 
> there a difference in this regards between development and production 
> buildouts.

A central eggs-directory (also dubbed "egg cache) in combination with 
"newest=false" can sometimes lead to interesting effects. If you have 
pinned down the versions of your eggs, this shouldn't be an issue, though.

> * If you're developing a series of applications, at what level in the 
> dependency tree do want to have versions pinned down (in whatever fashion)?

Preferrably all eggs are pinned down...

> * How do "other people" in the Zope world esp. deal with this.

Currently, I know that the early adopters of eggs+buildout (meaning, 
they use it in production), pin down the versions using the buildout 
versions mechanism::

   [buildout]
   ...
   versions = versions

   [versions]
   ZODB3 = 3.8.0b2
   zope.traversing = 3.4.1
   zope.component = 3.4.0
   ...


-- 
http://worldcookery.com -- Professional Zope documentation and training


More information about the Grok-dev mailing list