[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] tools: fix python version checking issue



# HG changeset patch
# User Yongjie Ren <yongjie.ren@xxxxxxxxx>
# Date 1330622631 0
# Node ID 6b003e5b398dc073c6086738ca023c997b18c7b0
# Parent  d86f2a45701d50ef919139303195adcb703d18b2
tools: fix python version checking issue

Even if python version is 2.4.3 which is newer than the required
version 2.3, the configure script still raises a version issue.  I
tested my patch with python 2.6.6 and 2.4.3. It will fix a syntax
error like the following.

 checking for python version >= 2.3 ... Traceback (most recent call last):
   File "<string>", line 1, in ?
 TypeError: 'str' object is not callable
 no
 configure: error: Python 2.4.3 is too old, minimum required version is 2.3

Signed-off-by: Yongjie Ren <yongjie.ren@xxxxxxxxx>
Acked-by: Roger Pau Monne <roger.pau@xxxxxxxxxxxxx>
Committed-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---


diff -r d86f2a45701d -r 6b003e5b398d tools/configure
--- a/tools/configure   Thu Mar 01 16:59:33 2012 +0000
+++ b/tools/configure   Thu Mar 01 17:23:51 2012 +0000
@@ -6127,7 +6127,7 @@
 fi
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python version >= 
2.3 " >&5
 $as_echo_n "checking for python version >= 2.3 ... " >&6; }
-`$PYTHON -c 'import sys; exit(eval("sys.version_info < (2, 3)"))'`
+`$PYTHON -c 'import sys; sys.exit(eval("sys.version_info < (2, 3)"))'`
 if test "$?" != "0"
 then
     python_version=`$PYTHON -V 2>&1`
diff -r d86f2a45701d -r 6b003e5b398d tools/m4/python_version.m4
--- a/tools/m4/python_version.m4        Thu Mar 01 16:59:33 2012 +0000
+++ b/tools/m4/python_version.m4        Thu Mar 01 17:23:51 2012 +0000
@@ -1,6 +1,6 @@
 AC_DEFUN([AX_CHECK_PYTHON_VERSION],
 [AC_MSG_CHECKING([for python version >= $1.$2 ])
-`$PYTHON -c 'import sys; exit(eval("sys.version_info < ($1, $2)"))'`
+`$PYTHON -c 'import sys; sys.exit(eval("sys.version_info < ($1, $2)"))'`
 if test "$?" != "0"
 then
     python_version=`$PYTHON -V 2>&1`

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.