[Distutils] Optimizing easy-install upgrade

Phillip J. Eby pje at telecommunity.com
Thu Jun 22 17:48:45 CEST 2006


At 07:25 AM 6/22/2006 -0400, Jim Fulton wrote:
>I can get at the specifiers.  What I want is either a public API for
>getting the
>specifiers, or an API that lets me retrieve the upper bound, if there
>is one.
>(Obviously, it could return None if no upper bound exists.)

Use the specs attribute, which is a list of (op,ver) pairs in ascending 
version order (and an undefined order among pairs that have equivalent 
versions).  The 'ver' is an *unparsed* version number, so you should parse 
it in order to do comparisons.

The specs attribute is currently undocumented, but I'll document it.  It 
has to be the way it is, because it's needed in order to produce a 
consistent string representation of a particular requirement.



More information about the Distutils-SIG mailing list