
At 04:52 PM 6/21/2006 -0400, Jim Fulton wrote:
ws.resolve([pkg_resources.Requirement.parse('demoneeded >1.1, <1.6, ==1.8')], e) [demoneeded 1.8 (/home/jim/tmp/dist/demoneeded-1.8-py2.4.egg)]
Hm, here the ==1.8 seems to have been or-ed with the result of anding >1.1 and <1.6.
Yes.
ws.resolve([pkg_resources.Requirement.parse('demoneeded <1.1, >1.6')], e) [demoneeded 1.9 (/home/jim/tmp/dist/demoneeded-1.9-py2.4.egg)] ws.resolve([pkg_resources.Requirement.parse('demoneeded !=1.8, ==1.8')], e) [demoneeded 1.9 (/home/jim/tmp/dist/demoneeded-1.9-py2.4.egg)]
I really don't know what's going on with these. :)
Are the rules for combining specifiers specified anywhere?
I was going to say, of course, and give you a link, but I'm surprised to discover there's nothing I can find. Which is weird because I *know* I wrote something. However I suspect it was originally on the PythonEggs wiki page, and it didn't get transferred to the PkgResources or setuptools pages before being deleted. Ah, yes, that's in fact the case. Here's the missing paragraph, grabbed from the wiki history: """Requirement strings basically consist of a distribution name, an optional list of "options" (more on this in a moment), and a comma-separated list of zero or more version conditions. Version conditions basically specify ranges of valid versions, using comparison operators. The version conditions you supply are sorted into ascending version order, and then scanned left to right until the package's version falls between a pair of > or >= and < or <= conditions, or exactly matches a == or != condition.""" I'll have to insert this back in the docs somewhere. Thanks for alerting me to it.