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

[Xen-devel] [PATCH] Cannot find Xen Python modules

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] Cannot find Xen Python modules
From: "S.Çağlar Onur" <caglar@xxxxxxxxxxxxx>
Date: Sat, 19 May 2007 02:38:14 +0300
Delivery-date: Fri, 18 May 2007 16:37:07 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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>
Organization: TÜBİTAK / UEKAE
Reply-to: caglar@xxxxxxxxxxxxx
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: KMail/1.9.7
Hi;

With xen-3.1.0 on Pardus 2007, "/usr/sbin/xend start" returns "Cannot find Xen 
Python modules." cause Xen Python modules installed 
into "/usr/lib/python2.4/site-packages/"

Following patch adds site-packages into search path

Signed-off-by: S.Çağlar Onur <caglar@xxxxxxxxxxxxx>

diff -r aee991c7723a tools/misc/xen-python-path
--- a/tools/misc/xen-python-path        Wed May 09 16:34:47 2007 +0100
+++ b/tools/misc/xen-python-path        Sat May 19 02:24:24 2007 +0300
@@ -30,12 +30,13 @@ import sys
 
 for p in ['python%s' % sys.version[:3], 'python']:
     for l in ['/usr/lib64', '/usr/lib']:
-        d = os.path.join(l, p)
-        if os.path.exists(os.path.join(d, AUXBIN)):
-            sys.path.append(d)
-            import xen.util.auxbin
-            print os.path.join(xen.util.auxbin.libpath(), p)
-            sys.exit(0)
+        for k in ['', 'site-packages/']:
+            d = os.path.join(l, p, k)
+            if os.path.exists(os.path.join(d, AUXBIN)):
+                sys.path.append(d)
+                import xen.util.auxbin
+                print os.path.join(xen.util.auxbin.libpath(), p)
+                sys.exit(0)
 
 print >>sys.stderr, "Cannot find Xen Python modules."
 sys.exit(1)

Cheers
-- 
S.Çağlar Onur <caglar@xxxxxxxxxxxxx>
http://cekirdek.pardus.org.tr/~caglar/

Linux is like living in a teepee. No Windows, no Gates and an Apache in house!

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] Cannot find Xen Python modules, S.Çağlar Onur <=