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

Martin Aspeli optilude at gmx.net
Sat Feb 10 00:28:02 CET 2007


Jim Fulton wrote:
> 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.

Thanks Jim!

> 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"?

How come it works with easy_install on the command line?

> 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.

I think that's what I'd expect, yes. For small eggs and where you're 
tracking svn closely, it makes sense. We do have a recipe 
(z2c.recipe.bundlecheckout) which can check out things and then you can 
list them as development eggs (which you do manually in buildout.cfg). 
We use this for Plone source code, for example, in "ploneout" the plone 
3 buildout. However, if I'm not actually interested in editing the 
thing, I'd rather not have it in src/.

Martin



More information about the Distutils-SIG mailing list