From: "Jan Beulich" Subject: [PATCH] add check for python-devel to tools build (take 2) Date: Wed, 22 Nov 2006 09:53:03 +0000 Message-ID: <45642C0F.76E4.0078.0@novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org Again, this must be given exec permission after applying. Thanks to Ewan Mellor, Anthony Liguori, and Daniel P. Berrange for pointing out problems with and solutions for the problems with the first version. Signed-off-by: Jan Beulich Index: 2006-11-17/tools/check/check_python_devel =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ 2006-11-17/tools/check/check_python_devel 2006-11-22 10:46:49.000000000 +0100 @@ -0,0 +1,16 @@ +#!/bin/bash +# CHECK-BUILD + +function error { + echo + echo " *** Check for python development environment FAILED" + exit 1 +} + +python -c ' +import os.path, sys +for p in sys.path: + if os.path.exists(p + "/config/Makefile"): + sys.exit(0) +sys.exit(1) +' || error