[Pkg-bazaar-maint] Bug#683130: robust cython version comparisons Was: [Python-apps-team] Bug#683133: xpra: robustify ...

Yaroslav Halchenko debian at onerussian.com
Sun Jul 29 15:46:38 UTC 2012


Hi Antoine,

NB CCing bug #683130 against bzr with similar issue

sorry for lacking details:

$> python -c 'from Cython.Compiler.Version import version; print(version)'
0.17.beta1

alternatively to manual parsing and ignoring errors you might like to just use

$> python -c 'from distutils.version import LooseVersion as LV; print LV("0.17") < LV("0.17.beta1")' 
True

it is ignorant about suffixes like .beta (thus above result) but is robust
enough in general and should work for your case I guess with min 0.14 version.

NB  StrictVersion is aware of some suffixes but would fail if such as
beta occurs so less advisable to use.

On Sun, 29 Jul 2012, Antoine Martin wrote:

> (snip)
> >ValueError: invalid literal for int() with base 10: 'beta1'
> You did not post the version string that Debian uses (the one that
> contains 'beta1') so the patch I have merged was only tested against
> the following version strings:
> * 0.16.0
> * 0.16.0.beta1
> * 0.16.beta1
> * 0.16.0beta1
> etc

> Please let me know if this works for you and I'll apply it to the
> stable 0.3.x (which is what debian uses) and 0.4.x branches.
> https://www.xpra.org/trac/changeset/1204

> Cheers
> Antoine
-- 
Yaroslav O. Halchenko
Postdoctoral Fellow,   Department of Psychological and Brain Sciences
Dartmouth College, 419 Moore Hall, Hinman Box 6207, Hanover, NH 03755
Phone: +1 (603) 646-9834                       Fax: +1 (603) 646-1419
WWW:   http://www.linkedin.com/in/yarik        



More information about the Pkg-bazaar-maint mailing list