Bug#683133: xpra: robustify cython version parsing: otherwise would fail to build against beta releases of cython

July 28th, 2012 - 08:30 pm ET by Yaroslav Halchenko | Report spam
Package: xpra
Version: 0.3.4+dfsg-1
Severity: normal

Testing the build against beta release of cython in experimental, and it fails with

Traceback (most recent call last):
File "setup.py", line 225, in <module>
"xtst", "xfixes", "xcomposite", "xdamage", "xrandr")
File "setup.py", line 215, in cython_add
cython_version_check()
File "setup.py", line 203, in cython_version_check
cython_version = [int(part) for part in cython_version_string.split(".")]
ValueError: invalid literal for int() with base 10: 'beta1'
dh_auto_clean: python2.6 setup.py clean -a returned exit code 1
make: *** [clean] Error 1


Debian Release: 6.0.5
APT prefers stable
APT policy: (900, 'stable'), (700, 'testing'), (600, 'unstable'), (300, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-5-vserver-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash


To UNSUBSCRIBE, email to debian-bugs-dist-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
email Follow the discussionReplies 4 repliesReplies Make a reply

Similar topics

Replies

#1 Antoine Martin
July 29th, 2012 - 07:00 am ET | Report spam
(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


To UNSUBSCRIBE, email to
with a subject of "unsubscribe". Trouble? Contact
Replies Reply to this message
#2 Yaroslav Halchenko
July 29th, 2012 - 12:00 pm ET | Report spam
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


To UNSUBSCRIBE, email to
with a subject of "unsubscribe". Trouble? Contact
Replies Reply to this message
#3 Antoine Martin
July 30th, 2012 - 02:10 am ET | Report spam
(snip)
$> 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.


I've re-done the change using LooseVersion:
https://www.xpra.org/trac/changeset/1205

The diff against the previous code (instead of what I had merged since)
is here:
https://www.xpra.org/trac/changeset...py&old03&new_path=%2Ftrunk%2Fsrc%2Fsetup.py&new05

Let me know if this works/looks ok to you and I'll apply to the stable
0.3.x and 0.4.x branches.

Thanks
Antoine


To UNSUBSCRIBE, email to
with a subject of "unsubscribe". Trouble? Contact
Replies Reply to this message
#4 Yaroslav Halchenko
July 30th, 2012 - 10:00 am ET | Report spam
On Mon, 30 Jul 2012, Antoine Martin wrote:

The diff against the previous code (instead of what I had merged
since) is here:
https://www.xpra.org/trac/changeset...py&old03&new_path=%2Ftrunk%2Fsrc%2Fsetup.py&new05

Let me know if this works/looks ok to you and I'll apply to the
stable 0.3.x and 0.4.x branches.



Looks ok to me.

If I were you I though I have just specified min_version='0.14.0'
(ie as string) and avoided dancing with the lists altogether ;)

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


To UNSUBSCRIBE, email to
with a subject of "unsubscribe". Trouble? Contact
email Follow the discussion Replies Reply to this message
Help Create a new topicReplies Make a reply
Search Make your own search