From patchwork Tue May 1 19:28:38 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Stefan Hajnoczi X-Patchwork-Id: 156192 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 73EB9B6FA9 for ; Wed, 2 May 2012 05:30:10 +1000 (EST) Received: from localhost ([::1]:60290 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SPIm0-00016J-4T for incoming@patchwork.ozlabs.org; Tue, 01 May 2012 15:30:08 -0400 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 d06nrmr1407.portsmouth.uk.ibm.com (9.149.38.185) by e06smtp14.uk.ibm.com (192.168.101.144) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 1 May 2012 20:29:39 +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 Received: from localhost ([9.145.211.102]) by d06av01.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id q41JTbU6029116; Tue, 1 May 2012 13:29:38 -0600 From: Stefan Hajnoczi To: Anthony Liguori Date: Tue, 1 May 2012 20:28:38 +0100 Message-Id: <1335900518-6730-6-git-send-email-stefanha@linux.vnet.ibm.com> X-Mailer: git-send-email 1.7.10 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 x-cbid: 12050119-1948-0000-0000-000001ACEF7A X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 195.75.94.110 Cc: qemu-devel@nongnu.org, Stefan Hajnoczi Subject: [Qemu-devel] [PATCH 5/5] configure: check for supported Python 2.x versions X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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