Muli Ben-Yehuda
2006-Nov-10 16:51 UTC
[Xen-devel] Re: [Xen-changelog] [xen-unstable] [XENAPI] Make xapi.py work with modules in /usr/lib/python.
On Fri, Nov 10, 2006 at 03:30:17PM +0000, Xen patchbot-unstable wrote:> # HG changeset patch > # User Alastair Tse <atse@xensource.com> > # Node ID 272cd2dc7cdfaffdda6ed5dd8b620152e0a9c7d8 > # Parent 5a4517468f4f7341eef9d20d4959187a7f2f2267 > [XENAPI] Make xapi.py work with modules in /usr/lib/python. > > Also Add host_set_name command. > > Signed-off-by: Alastair Tse <atse@xensource.com> > --- > tools/python/scripts/xapi.py | 18 +++++++++++++++++- > 1 files changed, 17 insertions(+), 1 deletion(-) > > diff -r 5a4517468f4f -r 272cd2dc7cdf tools/python/scripts/xapi.py > --- a/tools/python/scripts/xapi.py Fri Nov 10 11:01:15 2006 +0000 > +++ b/tools/python/scripts/xapi.py Fri Nov 10 12:44:47 2006 +0000 > @@ -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 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
John Levon
2006-Nov-10 17:44 UTC
Re: [Xen-devel] Re: [Xen-changelog] [xen-unstable] [XENAPI] Make xapi.py work with modules in /usr/lib/python.
On Fri, Nov 10, 2006 at 06:51:32PM +0200, Muli Ben-Yehuda wrote:> > [XENAPI] Make xapi.py work with modules in /usr/lib/python. > > > > Also Add host_set_name command. > > > > Signed-off-by: Alastair Tse <atse@xensource.com> > > --- > > tools/python/scripts/xapi.py | 18 +++++++++++++++++- > > 1 files changed, 17 insertions(+), 1 deletion(-) > > > > diff -r 5a4517468f4f -r 272cd2dc7cdf tools/python/scripts/xapi.py > > --- a/tools/python/scripts/xapi.py Fri Nov 10 11:01:15 2006 +0000 > > +++ b/tools/python/scripts/xapi.py Fri Nov 10 12:44:47 2006 +0000 > > @@ -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?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 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Alastair Tse
2006-Nov-10 17:57 UTC
Re: [Xen-devel] Re: [Xen-changelog] [xen-unstable] [XENAPI] Make xapi.py work with modules in /usr/lib/python.
On Fri, 2006-11-10 at 17:44 +0000, John Levon wrote:> On Fri, Nov 10, 2006 at 06:51:32PM +0200, Muli Ben-Yehuda wrote:> > > +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...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 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Muli Ben-Yehuda
2006-Nov-11 07:21 UTC
Re: [Xen-devel] Re: [Xen-changelog] [xen-unstable] [XENAPI] Make xapi.py work with modules in /usr/lib/python.
On Fri, Nov 10, 2006 at 05:57:07PM +0000, Alastair Tse wrote:> On Fri, 2006-11-10 at 17:44 +0000, John Levon wrote: > > On Fri, Nov 10, 2006 at 06:51:32PM +0200, Muli Ben-Yehuda wrote: > > > > > +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... > > 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.Right, but with XEN_PYTHON_NATIVE_INSTALL=y we end up using the right python directories (I hope).> 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.That will be great - I routinely install newer pythons on old distros. Cheers, Muli _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel