Make xapi.py work with modules in /usr/lib/python.
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 17 lines · Xen patchbot-unstable
# HG changeset patch
# User Alastair Tse <[email protected]>
# Node ID272cd2dc7cdfaffdda6ed5dd8b620152e0a9c7d8# Parent5a4517468f4f7341eef9d20d4959187a7f2f2267[XENAPI] Makexapi.pywork with modules in/usr/lib/python.Also Add
host_set_namecommand.Signed-off-by Alastair Tse <[email protected]>--- tools/python/scripts/xapi.py | 18 +++++++++++++++++- 1 files changed, 17 insertions(+), 1 deletion(-)diff -r
5a4517468f4f-r272cd2dc7cdftools/python/scripts/xapi.py
tools/python/scripts/xapi.py line 21
Quoted 6 lines
tools/python/scripts/xapi.py +3
-0@@ -16,11 +16,15 @@ # Copyright (C) 2006 XenSource Ltd. #============================================================================ +import sys +sys.path.append('/usr/lib/python') +
Hmm, what's the intention behind this change? won't it break horribly if the Xen tools are actually installed elsewhere but there's an old version in /usr/lib/python?
Cheers,
Muli
Quoted 16 lines · Muli Ben-Yehuda
Quoted 16 lines
[XENAPI] Make
xapi.pywork with modules in/usr/lib/python.Also Add
host_set_namecommand.Signed-off-by Alastair Tse <[email protected]>--- tools/python/scripts/xapi.py | 18 +++++++++++++++++- 1 files changed, 17 insertions(+), 1 deletion(-)diff -r
5a4517468f4f-r272cd2dc7cdftools/python/scripts/xapi.pytools/python/scripts/xapi.py +0
-0@@ -16,11 +16,15 @@ # Copyright (C) 2006 XenSource Ltd. #============================================================================
Quoted 7 lines
tools/python/scripts/xapi.py line 21
Quoted 3 lines
tools/python/scripts/xapi.py +3
-0+import sys +sys.path.append('/usr/lib/python') +Hmm, what's the intention behind this change? won't it break horribly if the Xen tools are actually installed elsewhere but there's an old version in
/usr/lib/python?
This seems dubious to me too. This seems like a problematic python installation that needs this change, and troublesome for other installations as Muli points out...
regards
john
Quoted 10 lines · John Levon
Quoted 7 lines · Muli Ben-Yehuda
Review
Quoted 3 lines
(quoted diff) +3
-0+import sys +sys.path.append('/usr/lib/python') +Hmm, what's the intention behind this change? won't it break horribly if the Xen tools are actually installed elsewhere but there's an old version in
/usr/lib/python?
Quoted 3 lines
This seems dubious to me too. This seems like a problematic python installation that needs this change, and troublesome for other installations as Muli points out...
xapi.py isn't installed on any system and only exists in the Xend dev tree for me to test the Xen API support in Xend.
The default installation root is /usr/lib/python for the vanilla xen python tools.
Yes, I agree it is a concern that Xend/Xm puts everything
in /usr/lib/python, but that is a whole separate thread. I have a patch locally that fixes this behaviour along with install.sh fixes it, if that is what people are concerned about.
Cheers,
Alastair
Quoted 15 lines · Alastair Tse
Quoted 10 lines · John Levon
Quoted 7 lines · Muli Ben-Yehuda
Review
Quoted 3 lines
(quoted diff) +3
-0+import sys +sys.path.append('/usr/lib/python') +Hmm, what's the intention behind this change? won't it break horribly if the Xen tools are actually installed elsewhere but there's an old version in
/usr/lib/python?Quoted 3 lines
This seems dubious to me too. This seems like a problematic python installation that needs this change, and troublesome for other installations as Muli points out...
Quoted 5 lines
xapi.pyisn't installed on any system and only exists in the Xend dev tree for me to test the Xen API support in Xend.The default installation root is
/usr/lib/pythonfor the vanilla xen python tools.
Right, but with XEN_PYTHON_NATIVE_INSTALL=y we end up using the right python directories (I hope).
Quoted 4 lines
Yes, I agree it is a concern that Xend/Xm puts everything
in/usr/lib/python, but that is a whole separate thread. I have a patch locally that fixes this behaviour along withinstall.shfixes it, if that is what people are concerned about.
That will be great - I routinely install newer pythons on old distros.
Cheers,
Muli