From mboxrd@z Thu Jan 1 00:00:00 1970 From: Olaf Hering Subject: Re: [PATCH v8] build: add autoconf to replace custom checks in tools/check Date: Thu, 23 Feb 2012 18:36:17 +0100 Message-ID: <20120223173617.GA19213@aepfle.de> References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Roger Pau Monne Cc: ian.jackson@citrix.com, ian.campbell@citrix.com, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Tue, Feb 21, Roger Pau Monne wrote: > -${PYTHON} -c ' > -import sys > -sys.exit(sys.version_info[0] < 2 or sys.version_info[1] < 3) > -' || fail "need python version >= 2.3" > +`$PYTHON -c 'import sys; exit(eval("sys.version_info < ($1, $2)"))'` Old python can not handle that new syntax: $ python Python 2.4.2 (#1, Feb 16 2011, 12:49:02) [GCC 4.1.2 20070115 (SUSE Linux)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import sys >>> exit(eval("sys.version_info < (2, 3)")) Traceback (most recent call last): File "", line 1, in ? TypeError: 'str' object is not callable >>>