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@intel.com>
Acked-by: Roger Pau Monne <roger.pau@entel.upc.edu>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
This commit is contained in:
Yongjie Ren committed 2012-03-01 17:23:51 +00:00
1 parent 192c0b406d
commit 05bc2e1195
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -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`
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.