[Distutils] Building an egg from Subversion using zc.buildout

Jim Fulton jim at zope.com
Fri Feb 9 23:26:17 CET 2007


On Jan 29, 2007, at 6:14 PM, Martin Aspeli wrote:

> Phillip J. Eby wrote:
>> At 10:37 PM 1/29/2007 +0000, Martin Aspeli wrote:
>>> Phillip J. Eby wrote:
>>>
>>>> Development snapshots of setuptools can be checked out with
>>>> "setuptools==dev", and that will always download a new version  
>>>> because the
>>>> installed version is always a version like 0.6c2dev-r51290 or
>>>> something.  This doesn't match ==dev, thereby forcing  
>>>> easy_install to
>>>> download a fresh copy.
>>> Could you explain how the find-link would work with an ==dev version
>>> specification?
>>
>> #egg=archetypes.kss-dev
>>
>> That is, use 'dev' as the version in the link.  The combination of  
>> an ==dev
>> version specification and a #egg=projectname-dev tag means that  
>> the code
>> will be downloaded and rebuilt *every* time, however.
>
> Alas, this gives me this error:

...

> ValueError: ("Couldn't find", Requirement.parse 
> ('archetypes.kss==dev'))

I finally found some time to look into this.

Buildout uses setuptools APIs.  It uses a PackageIndex to download  
the distribution and this actually works.  It then uses an  
environment best_match method to get a distribution object and  
best_match returns None.  If I remove the ==dev from the requirement,  
then best_match is able to find the distribution. This happens  
because apparently no distributions match a requirement for the "dev"  
version.  Should I view this as a bug in setuptools? Or does buildout  
need to special case the version "dev"?

Martin,

If this worked, then buildout would checkout, build, and download  
these eggs every time it was run in "newest" mode, which is the  
default mode.  I'll make this work on principle, but I suggest that  
it would be much more efficient and useful to have a recipe that  
checked out the source and built a develop egg on install and updated  
it on update.

Jim

--
Jim Fulton			mailto:jim at zope.com		Python Powered!
CTO 				(540) 361-1714			http://www.python.org
Zope Corporation	http://www.zope.com		http://www.zope.org





More information about the Distutils-SIG mailing list