Ren, Yongjie
2012-Feb-24 16:38 UTC
[PATCH] tools: fix python version checking issue in configuration
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@intel.com> -- tools/configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -r a4d93d0e0df2 tools/configure --- a/tools/configure Wed Feb 22 14:33:24 2012 +0000 +++ b/tools/configure Fri Feb 24 21:18:31 2012 +0800 @@ -6293,7 +6293,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` Best Regards, Yongjie Ren (Jay)
Roger Pau Monné
2012-Feb-24 20:21 UTC
Re: [PATCH] tools: fix python version checking issue in configuration
2012/2/24 Ren, Yongjie <yongjie.ren@intel.com>:> 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@intel.com> > -- > > tools/configure | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff -r a4d93d0e0df2 tools/configure > --- a/tools/configure Wed Feb 22 14:33:24 2012 +0000 > +++ b/tools/configure Fri Feb 24 21:18:31 2012 +0800 > @@ -6293,7 +6293,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)"))'`This is wrong, tools/configure should never be modified directly. Instead tools/configure.ac should be modified and autogen.sh rerun to generate a new configure script.> if test "$?" != "0" > then > python_version=`$PYTHON -V 2>&1` > > > > Best Regards, > Yongjie Ren (Jay) > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xen.org > lists.xen.org/xen-devel_______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org lists.xen.org/xen-devel
Ren, Yongjie
2012-Feb-25 03:06 UTC
Re: [PATCH] tools: fix python version checking issue in configuration
> -----Original Message----- > From: royger@gmail.com [mailto:royger@gmail.com] On Behalf Of Roger > Pau Monné > Sent: Saturday, February 25, 2012 4:22 AM > To: Ren, Yongjie > Cc: xen-devel@lists.xen.org; ian.jackson@citrix.com > Subject: Re: [Xen-devel] [PATCH] tools: fix python version checking issue in > configuration > > 2012/2/24 Ren, Yongjie <yongjie.ren@intel.com>: > > 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@intel.com> > > -- > > > > tools/configure | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff -r a4d93d0e0df2 tools/configure > > --- a/tools/configure Wed Feb 22 14:33:24 2012 +0000 > > +++ b/tools/configure Fri Feb 24 21:18:31 2012 +0800 > > @@ -6293,7 +6293,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)"))'` > > This is wrong, tools/configure should never be modified directly. > Instead tools/configure.ac should be modified and autogen.sh rerun to > generate a new configure script. >Thanks for your point. I'll re-send another patch.> > if test "$?" != "0" > > then > > python_version=`$PYTHON -V 2>&1` > > > > > > > > Best Regards, > > Yongjie Ren (Jay) > > > > > > _______________________________________________ > > Xen-devel mailing list > > Xen-devel@lists.xen.org > > lists.xen.org/xen-devel_______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org lists.xen.org/xen-devel