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

Phillip J. Eby pje at telecommunity.com
Sat Feb 10 20:16:06 CET 2007

At 12:54 PM 2/10/2007 -0500, Jim Fulton wrote:

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

Yes, if you put it on the command line.  No, if it's a dependency declared 
in an egg; it'll have the same problem as you're having with buildout.

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

Actually, the reason to use an ==dev (or other similar tag) in a dependency 
is to allow it to pick up a package that's *only* available via SVN.

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

Note that easy_install can be told to --record what files it installs, so 
you could build a WorkingSet or Environment from that list.

More information about the Distutils-SIG mailing list