WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] Re: [PATCH] add check for python-devel to tools build

To: "Daniel P. Berrange" <berrange@xxxxxxxxxx>
Subject: Re: [Xen-devel] Re: [PATCH] add check for python-devel to tools build
From: Ewan Mellor <ewan@xxxxxxxxxxxxx>
Date: Tue, 21 Nov 2006 17:23:19 +0000
Cc: Anthony Liguori <aliguori@xxxxxxxxxx>, xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxxxx>
Delivery-date: Tue, 21 Nov 2006 09:23:28 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <20061121171043.GH1951@xxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <45633B55.76E4.0078.0@xxxxxxxxxx> <45632EA5.6090404@xxxxxxxxxx> <20061121170649.GH30929@xxxxxxxxxxxxxxxxxxxxxx> <20061121171043.GH1951@xxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.9i
On Tue, Nov 21, 2006 at 05:10:43PM +0000, Daniel P. Berrange wrote:

> On Tue, Nov 21, 2006 at 05:06:49PM +0000, Ewan Mellor wrote:
> > On Tue, Nov 21, 2006 at 10:51:49AM -0600, Anthony Liguori wrote:
> > 
> > > Jan Beulich wrote:
> > > >Again, this must be given exec permission after applying.
> > > >
> > > >Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>
> > > >
> > > >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-21 
> > > >12:03:08.000000000 +0100
> > > >@@ -0,0 +1,13 @@
> > > >+#!/bin/bash
> > > >+# CHECK-BUILD
> > > >+
> > > >+function error {
> > > >+    echo
> > > >+    echo "  *** Check for python development environment FAILED"
> > > >+    exit 1
> > > >+}
> > > >+
> > > >+lib=lib
> > > >+test "$(uname -m)" != x86_64 || lib=lib64
> > > >+set -e
> > > >+[ -e /usr/$lib/python/config/Makefile ] || error
> > > 
> > > There is no /usr/lib/python/config/Makefile on Ubuntu.  You should be 
> > > okay if you also check for /usr/lib/python-2.[345]/config/Makefile.
> > 
> > My Debian box has /usr/lib/python2.3.  How about
> > /usr/lib/python*/config/Makefile?  That should be OK, and has the advantage 
> > of
> > including /usr/lib/python.
> 
> Using wildcards though will not be reliable. eg I have both python 2.3 and 2.4
> installed, but python 2.4 is the version I'm deploying Xen against. This test
> won't catch the case where I have  python-devel = 2.3, but don't have the
> python-devel == 2.4 installed. We want to make sure we only check against the
> version we're actually building against. 

python -c '
import os.path, sys
for p in sys.path:
  if os.path.exists(p + "/config/Makefile"):
    sys.exit(0)
sys.exit(1)
'

Ewan.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel