[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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



# 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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.