On Fri, May 2, 2008 at 12:30 PM, Pete <[EMAIL PROTECTED]> wrote:
 > Hi-
 >
 >  What's the proper way to spell "any version in the 3.0.x series" if a
 > project has a 3.1.0beta3 release?
 >
 >  Specifically, CherryPy has both 3.0.2 and 3.1.0beta3 releases.  I'd like to
 > depend on any 3.0.x
 >
 >  I've tried both 'CherryPy < 3.1' and 'CherryPy < 3.1.0' in my
 > install_requires, and both cause setuptools to pull 3.1.0beta3.
 >
 >  I realize I can use 'CherryPy == 3.0.2' but that defeats the "any 3.0.x"
 > idea...

 I find this surprising as well, but the answer is:

 >>> import pkg_resources
 >>> v = pkg_resources.parse_version
 >>> v('3.1.0beta3') < v('3.1.0')
 True
 >>> v('3.1.0beta3') < v('3.1.0a0')
 False

 I wish it was "easier" to say "3.1.x" (as in any final sub-point
 release in the 3 series) or "1.x" (as in any final version 1 release)
 which didn't allow development, alpha, beta, candidate, etc. releases.
 Is there?
_______________________________________________
Distutils-SIG maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/distutils-sig

Reply via email to