From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:46858) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SPIlg-0000vF-99 for qemu-devel@nongnu.org; Tue, 01 May 2012 15:29:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SPIld-00058F-2M for qemu-devel@nongnu.org; Tue, 01 May 2012 15:29:47 -0400 Received: from e06smtp14.uk.ibm.com ([195.75.94.110]:51265) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SPIlc-00057P-Qz for qemu-devel@nongnu.org; Tue, 01 May 2012 15:29:45 -0400 Received: from /spool/local by e06smtp14.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 1 May 2012 20:29:41 +0100 Received: from d06av01.portsmouth.uk.ibm.com (d06av01.portsmouth.uk.ibm.com [9.149.37.212]) by d06nrmr1407.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q41JTcWs2273454 for ; Tue, 1 May 2012 20:29:38 +0100 Received: from d06av01.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av01.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q41JTcnb029119 for ; Tue, 1 May 2012 13:29:38 -0600 From: Stefan Hajnoczi Date: Tue, 1 May 2012 20:28:38 +0100 Message-Id: <1335900518-6730-6-git-send-email-stefanha@linux.vnet.ibm.com> In-Reply-To: <1335900518-6730-1-git-send-email-stefanha@linux.vnet.ibm.com> References: <1335900518-6730-1-git-send-email-stefanha@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [Qemu-devel] [PATCH 5/5] configure: check for supported Python 2.x versions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: qemu-devel@nongnu.org, Stefan Hajnoczi The tracetool code requires Python 2.4, which was released in 2004. Check for a supported Python version so we can give a clear error message. Signed-off-by: Stefan Hajnoczi Reviewed-by: LluĂ­s Vilanova --- configure | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/configure b/configure index 3c72fa0..b4f1379 100755 --- a/configure +++ b/configure @@ -1239,9 +1239,10 @@ fi # Note that if the Python conditional here evaluates True we will exit # with status 1 which is a shell 'false' value. -if ! "$python" -c 'import sys; sys.exit(sys.version_info[0] >= 3)'; then - echo "Python 2 required but '$python' is version 3 or better." - echo "Use --python=/path/to/python to specify a Python 2." +if ! "$python" -c 'import sys; sys.exit(sys.version_info < (2,4) or sys.version_info >= (3,))'; then + echo "Cannot use '$python', Python 2.4 or later is required." + echo "Note that Python 3 or later is not yet supported." + echo "Use --python=/path/to/python to specify a supported Python." exit 1 fi -- 1.7.10