From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Zeffertt Subject: Re: [PATCH] Attempt to build xen-unstable on Ubuntu 9.04 Server (Ubuntu Desktop installed) Date: Thu, 07 May 2009 14:15:04 +0100 Message-ID: <4A02DED8.5000503@eu.citrix.com> References: <295806.73058.qm@web56108.mail.re3.yahoo.com> <4A01BCD2.7000505@eu.citrix.com> <18946.49599.604463.744370@mariner.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <18946.49599.604463.744370@mariner.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Ian Jackson Cc: "bderzhavets@yahoo.com" , xen-devel List-Id: xen-devel@lists.xenproject.org Ian Jackson wrote: > Alex Zeffertt writes ("Re: [Xen-devel] Attempt to build xen-unstable on Ubuntu 9.04 Server (Ubuntu Desktop installed)"): >> It looks like the problem is that if you have python2.6 installed then >> xen-unstable.hg installs into /usr/lib/python2.6/site-packages/xen, but >> site-packages is no longer in the default path in python2.6. > > This is a bit odd. > > We don't do anything special with our uses of the Python distutils > module. The string "site-packages" does not even appear in > xen-unstable the source[1] ! > >> PS This is also relevant >> https://bugs.launchpad.net/ubuntu/+source/python2.6/+bug/362570 > > This looks like exactly our bug. So I think this is a bug in the > Ubuntu python packaging. But the Ubuntu Python maintainer seems not > to have understood the problem and has called the bug a wishlist bug. > > Ian. This patch appears to fix the problem. Just don't use --prefix. It doesn't seem to make any difference for python2.5, but it installs to the correct place under python 2.6. -- Alex Install xen python modules to correct path under python2.6. Do not use "--prefix" with setup.py scripts. In python2.6 this causes modules to be installed into /usr/lib/python2.6/site-packages, which is not on the default python2.6 sys.path. Without the --prefix option modules get installed to /usr/local/lib/python2.6/dist-packages, which is on the default python2.6 sys.path. If the installed version of python is python2.5, modules get installed to /usr/lib/python2.5/site-packages, which is on the default python2.5 sys.path. Signed-off-by diff -r 474e93610de3 tools/pygrub/Makefile --- a/tools/pygrub/Makefile Thu May 07 10:46:49 2009 +0100 +++ b/tools/pygrub/Makefile Thu May 07 13:59:20 2009 +0100 @@ -11,7 +12,7 @@ .PHONY: install install: all CC="$(CC)" CFLAGS="$(CFLAGS)" python setup.py install \ - --prefix="$(PREFIX)" --root="$(DESTDIR)" --force + --root="$(DESTDIR)" --force $(INSTALL_DIR) $(DESTDIR)/var/run/xend/boot .PHONY: clean diff -r 474e93610de3 tools/python/Makefile --- a/tools/python/Makefile Thu May 07 10:46:49 2009 +0100 +++ b/tools/python/Makefile Thu May 07 13:59:20 2009 +0100 @@ -56,7 +56,7 @@ .PHONY: install install: install-messages install-dtd CC="$(CC)" CFLAGS="$(CFLAGS)" python setup.py install \ - --prefix="$(PREFIX)" --root="$(DESTDIR)" --force + --root="$(DESTDIR)" --force install-dtd: all $(INSTALL_DIR) $(DESTDIR)$(DOCDIR) diff -r 474e93610de3 tools/security/Makefile --- a/tools/security/Makefile Thu May 07 10:46:49 2009 +0100 +++ b/tools/security/Makefile Thu May 07 13:59:20 2009 +0100 @@ -61,7 +61,7 @@ $(INSTALL_DIR) $(DESTDIR)$(ACM_SECGEN_CGIDIR) $(INSTALL_PROG) $(ACM_INST_CGI) $(DESTDIR)$(ACM_SECGEN_CGIDIR) python python/setup.py install \ - --prefix="$(PREFIX)" --root="$(DESTDIR)" --force + --root="$(DESTDIR)" --force else .PHONY: all all: