On Mon, Aug 23, 2010 at 12:46 PM, Adam GROSZER <agros...@gmail.com> wrote:
> Hello,
>
> I have here this version spec in setup.py:
> 'zope.testing >=3.6.0,<3.10.0',
>
> but zc.buildout does not get it right.
> Source is here:
> svn://svn.zope.org/repos/main/zc.recipe.testrunner/branches/1.2.1
> Output is here:
> http://paste.lisp.org/+2FSQ
>
> Why on earth does zc.buildout pick zope.testing = 3.10.0 with the
> above spec??

If you look earlier in the output you provide a link to, buildout does
get it right.  It picks 3.9.5.

Then, when zc.recipe.testrunner runs, it tries to load zope.testing
explicitly:

  eggs, ws = self.egg.working_set(('zope.testing', ))

It doesn't restrict the version here.  This didn't cause a problem
until you added the restriction in in setup.py.

Anyone not interested in the implementation of zc.recipe.testrunner should
stop reading here, if you haven't already. :)

self.egg implies zc.recipe.testrunner, so the low-level buildout APIs
are asked to create a working set for zc.recipe.testrunner and
zope.testing.  It happens to load packages in a breadth first order
and gets the newest version of zope.testing before it tries to get the
restricted dependency of zc.recipe.testrunner.

The easiest way to fix this is to remove the redundant and now
incorrect reference to zope.testing in the call to
self.egg.working_set:

  eggs, ws = self.egg.working_set()

Jim

--
Jim Fulton
_______________________________________________
Distutils-SIG maillist  -  Distutils-SIG@python.org
http://mail.python.org/mailman/listinfo/distutils-sig

Reply via email to