From patchwork Fri Apr 27 14:23:45 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Hajnoczi X-Patchwork-Id: 155495 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 94ECBB6F9F for ; Sat, 28 Apr 2012 00:55:39 +1000 (EST) Received: from localhost ([::1]:36785 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SNm6c-000637-3u for incoming@patchwork.ozlabs.org; Fri, 27 Apr 2012 10:25:06 -0400 Received: from eggs.gnu.org ([208.118.235.92]:48922) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SNm5k-0003re-Tn for qemu-devel@nongnu.org; Fri, 27 Apr 2012 10:24:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SNm5e-0008BR-IT for qemu-devel@nongnu.org; Fri, 27 Apr 2012 10:24:12 -0400 Received: from e06smtp13.uk.ibm.com ([195.75.94.109]:46771) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SNm5e-00089U-8g for qemu-devel@nongnu.org; Fri, 27 Apr 2012 10:24:06 -0400 Received: from /spool/local by e06smtp13.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 27 Apr 2012 15:24:02 +0100 Received: from d06nrmr1407.portsmouth.uk.ibm.com (9.149.38.185) by e06smtp13.uk.ibm.com (192.168.101.143) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Fri, 27 Apr 2012 15:23:51 +0100 Received: from d06av11.portsmouth.uk.ibm.com (d06av11.portsmouth.uk.ibm.com [9.149.37.252]) by d06nrmr1407.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q3RENoBx2293920 for ; Fri, 27 Apr 2012 15:23:50 +0100 Received: from d06av11.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av11.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q3RENor6008943 for ; Fri, 27 Apr 2012 08:23:50 -0600 Received: from localhost (stefanha-thinkpad.manchester-maybrook.uk.ibm.com [9.174.219.241]) by d06av11.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id q3RENokq008928; Fri, 27 Apr 2012 08:23:50 -0600 From: Stefan Hajnoczi To: Date: Fri, 27 Apr 2012 15:23:45 +0100 Message-Id: <1335536625-4621-5-git-send-email-stefanha@linux.vnet.ibm.com> X-Mailer: git-send-email 1.7.10 In-Reply-To: <1335536625-4621-1-git-send-email-stefanha@linux.vnet.ibm.com> References: <1335536625-4621-1-git-send-email-stefanha@linux.vnet.ibm.com> x-cbid: 12042714-2966-0000-0000-000003EA64CE X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 195.75.94.109 Cc: Peter Maydell , Anthony Liguori , Stefan Hajnoczi , Erik Rull , Andreas Faerber , =?UTF-8?q?Llu=C3=ADs=20Vilanova?= Subject: [Qemu-devel] [PATCH 4/4] 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 --- configure | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/configure b/configure index 15bbc73..39c7ac2 100755 --- a/configure +++ b/configure @@ -1247,9 +1247,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[0] != 2 or sys.version_info[1] < 4)'; 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