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

Jim Fulton jim at zope.com
Sat Feb 10 18:54:54 CET 2007


On Feb 9, 2007, at 6:49 PM, Phillip J. Eby wrote:

> At 05:26 PM 2/9/2007 -0500, Jim Fulton wrote:
>> > 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?
>
> The normal usage is "==dev,>=realver" where 'realver' is the real  
> version you want.

Is using just ==dev is correct usage? It works with easy_install.

I think the user's desire is to get the most recent version.  It's  
not clear to me that they'd know what other revision to specify.

>>  Or does buildout
>> need to special case the version "dev"?
>
> I don't think so.

If ==dev is considered valid and if the environment best_match method  
isn't going to consider it a match against installed distributions,  
then I'll need to  special case it or use some other API.  People  
using buildout are generally going to expect things that work with  
easy_install to work with buildout.

(Note: Buildout uses PackageIndex to locate and fetch distributions.  
It then installs distributions itself.  if the distribution is  
already an egg,  then this is straightforward.  Otherwise, buildout  
invokes easy_install to do the installation.  It can't get a return  
value from easy_install, so it uses an Environment to find the egg  
that easy_install created.)

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