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-changelog

[Xen-changelog] [xen-unstable] xend: Add site-packages into Python searc

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] xend: Add site-packages into Python search path
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 04 Jun 2007 03:15:45 -0700
Delivery-date: Mon, 04 Jun 2007 03:30:07 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Date 1180017005 -3600
# Node ID 21f1a7a7ea30cd2c6855df2842fe0843bf7dfc1a
# Parent  4c2124aac598e3bf46f39df1514c89dd4bc6cb76
xend: Add site-packages into Python search path
Signed-off-by: S.Caglar Onur <caglar@xxxxxxxxxxxxx>
---
 tools/misc/xen-python-path |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diff -r 4c2124aac598 -r 21f1a7a7ea30 tools/misc/xen-python-path
--- a/tools/misc/xen-python-path        Thu May 24 15:29:11 2007 +0100
+++ b/tools/misc/xen-python-path        Thu May 24 15:30:05 2007 +0100
@@ -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)

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] xend: Add site-packages into Python search path, Xen patchbot-unstable <=