ia64/xen-unstable

changeset 15215:21f1a7a7ea30

xend: Add site-packages into Python search path
Signed-off-by: S.Caglar Onur <caglar@pardus.org.tr>
author kfraser@localhost.localdomain
date Thu May 24 15:30:05 2007 +0100 (2007-05-24)
parents 4c2124aac598
children e046da853ffc
files tools/misc/xen-python-path
line diff
     1.1 --- a/tools/misc/xen-python-path	Thu May 24 15:29:11 2007 +0100
     1.2 +++ b/tools/misc/xen-python-path	Thu May 24 15:30:05 2007 +0100
     1.3 @@ -30,12 +30,13 @@ import sys
     1.4  
     1.5  for p in ['python%s' % sys.version[:3], 'python']:
     1.6      for l in ['/usr/lib64', '/usr/lib']:
     1.7 -        d = os.path.join(l, p)
     1.8 -        if os.path.exists(os.path.join(d, AUXBIN)):
     1.9 -            sys.path.append(d)
    1.10 -            import xen.util.auxbin
    1.11 -            print os.path.join(xen.util.auxbin.libpath(), p)
    1.12 -            sys.exit(0)
    1.13 +        for k in ['', 'site-packages/']:
    1.14 +            d = os.path.join(l, p, k)
    1.15 +            if os.path.exists(os.path.join(d, AUXBIN)):
    1.16 +                sys.path.append(d)
    1.17 +                import xen.util.auxbin
    1.18 +                print os.path.join(xen.util.auxbin.libpath(), p)
    1.19 +                sys.exit(0)
    1.20  
    1.21  print >>sys.stderr, "Cannot find Xen Python modules."
    1.22  sys.exit(1)