[Distutils] why this version spec does not work?
Adam GROSZER
agroszer at gmail.com
Tue Aug 24 16:31:35 CEST 2010
Hello Jim,
Monday, August 23, 2010, 8:48:16 PM, you wrote:
JF> On Mon, Aug 23, 2010 at 12:46 PM, Adam GROSZER <agroszer at 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??
JF> If you look earlier in the output you provide a link to, buildout does
JF> get it right. It picks 3.9.5.
JF> Then, when zc.recipe.testrunner runs, it tries to load zope.testing
JF> explicitly:
JF> eggs, ws = self.egg.working_set(('zope.testing', ))
JF> It doesn't restrict the version here. This didn't cause a problem
JF> until you added the restriction in in setup.py.
JF> Anyone not interested in the implementation of zc.recipe.testrunner should
JF> stop reading here, if you haven't already. :)
JF> self.egg implies zc.recipe.testrunner, so the low-level buildout APIs
JF> are asked to create a working set for zc.recipe.testrunner and
JF> zope.testing. It happens to load packages in a breadth first order
JF> and gets the newest version of zope.testing before it tries to get the
JF> restricted dependency of zc.recipe.testrunner.
JF> The easiest way to fix this is to remove the redundant and now
JF> incorrect reference to zope.testing in the call to
JF> self.egg.working_set:
JF> eggs, ws = self.egg.working_set()
Thanks for the pointer, but in my case it seems to work only with the
version spec added:
eggs, ws = self.egg.working_set(('zope.testing <3.10.0', ))
If I do
eggs, ws = self.egg.working_set()
zope.testing seems to be missed from the test script entirely.
--
Best regards,
Adam GROSZER mailto:agroszer at gmail.com
--
Quote of the day:
God hears no sweeter music than the cracked chimes of the courageous human spirit ringing in imperfect acknowledgement of His perfect love.
- Joshua Loth Liebman
More information about the Distutils-SIG
mailing list