diff options
author | kfraser@localhost.localdomain <kfraser@localhost.localdomain> | 2007-06-20 17:07:15 +0100 |
---|---|---|
committer | kfraser@localhost.localdomain <kfraser@localhost.localdomain> | 2007-06-20 17:07:15 +0100 |
commit | d40dbdf39f8dbfb89f2812c7a11db49d0e73c44f (patch) | |
tree | 7f836b4d6b62193c80a8a40c1ac65fd7ed276cbe /tools/misc/xen-python-path | |
parent | a1f868f2a3bef3d349b679061da57b937ea24b1a (diff) | |
download | xen-d40dbdf39f8dbfb89f2812c7a11db49d0e73c44f.tar.gz xen-d40dbdf39f8dbfb89f2812c7a11db49d0e73c44f.tar.bz2 xen-d40dbdf39f8dbfb89f2812c7a11db49d0e73c44f.zip |
tools: Adjust tools' path calculation.
I'm suggesting this change to make another tiny step towards the
ability to run the tools e.g. out of the build tree (so that multiple
different Xen versions can co-exist without the requirement to
re-install the respective version with each boot).
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Diffstat (limited to 'tools/misc/xen-python-path')
-rw-r--r-- | tools/misc/xen-python-path | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/tools/misc/xen-python-path b/tools/misc/xen-python-path index da3d2dd2ba..57774a332b 100644 --- a/tools/misc/xen-python-path +++ b/tools/misc/xen-python-path @@ -28,8 +28,13 @@ import os import os.path import sys -for p in ['python%s' % sys.version[:3], 'python']: - for l in ['/usr/lib64', '/usr/lib']: +usr = os.path.dirname(os.path.dirname(sys.argv[0])) +list = [ os.path.join(usr,'lib64') ] +list += [ os.path.join(usr,'lib') ] +list += ['/usr/lib64', '/usr/lib'] + +for l in list: + for p in ['python%s' % sys.version[:3], 'python']: for k in ['', 'site-packages/']: d = os.path.join(l, p, k) if os.path.exists(os.path.join(d, AUXBIN)): |