[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [Xen-users] Re: [Xen-devel] Re: xen-unstable: ImportError: No module named xen.xm



> On Thu, 20 Jan 2011 17:38:23 +0000 <Ian.Campbell@xxxxxxxxxxxxx> wrote:
>
> > >> ['', '/usr/lib/python2.6', '/usr/lib/python2.6/plat-linux2',
> > >> '/usr/lib/python2.6/lib-tk', '/usr/lib/python2.6/lib-old',
> > >> '/usr/lib/python2.6/lib-dynload',
> > >> '/usr/local/lib/python2.6/dist-packages',
> > >> '/usr/lib/python2.6/dist-packages', '/usr/lib/pymodules/python2.6']
>
> vs.
>
> > /usr/lib/python2.6/site-packages/xen/xm/main.py

Have you tried modifying the Config.mk is the root directory of your Xen.4.1 sources before compiling?

hg diff Config.mk output:

--- a/Config.mk    Tue Jan 18 17:23:24 2011 +0000
+++ b/Config.mk    Fri Jan 21 13:03:32 2011 +0000
@@ -1,7 +1,8 @@
 # -*- mode: Makefile; -*-
 
 # A debug build of Xen and tools?
-debug ?= y
+#debug ?= y
+debug ?= n
 
 XEN_COMPILE_ARCH    ?= $(shell uname -m | sed -e s/i.86/x86_32/ \
                          -e s/i86pc/x86_32/ -e s/amd64/x86_64/)
@@ -56,7 +57,8 @@
 FLEX    ?= flex
 
 PYTHON      ?= python
-PYTHON_PREFIX_ARG ?= --prefix="$(PREFIX)"
+PYTHON_PREFIX_ARG  ?=
+#PYTHON_PREFIX_ARG ?= --prefix="$(PREFIX)"
 # The above requires that PREFIX contains *no spaces*. This variable is here
 # to permit the user to set PYTHON_PREFIX_ARG to '' to workaround this bug:
 #  https://bugs.launchpad.net/ubuntu/+bug/362570



My resulting python path with when changing PYTHON_PREFIX_ARG was apparently /usr/local/lib/python2.6/dist-packages which I noticed was in your python's interpreter search path(s).

ls -l /usr/local/lib/python2.6/dist-packages
total 48
-rwxr-xr-x  1 topgun topgun 30693 Jan 18 20:27 fsimage.so
drwxr-xr-x  2 topgun topgun  4096 Jan 18 20:57 grub
-rw-r--r--  1 topgun topgun   226 Jan 18 20:31 pygrub-0.3.egg-info
drwxr-xr-x 10 topgun topgun  4096 Jan 18 20:57 xen
-rw-r--r--  1 topgun topgun   171 Jan 18 20:31 xen-3.0.egg-info


This is only a hack, as I am not sure if I bug has already been reported on the Debian BTS to fix the issue with python 2.6 onwards.

 /usr/lib/python2.6/distutils/command/install.py still makes reference to site-packages <-- causing the issue (personally unconfirmed, source Xen developer: Ian Campbell who definatly knows more than I do when it comes to Xen or python).

>
> So the Xen python bits are not installed to a path which the python
> interpreter is searching.
>
> Xen relies on the python distutils library to build and install its
> python bits and makes no specific reference to site-packages in its
> makefiles (that I can find).
>
> The Debian python policy
> (http://www.debian.org/doc/packaging-manuals/python-policy/ch-python.html) suggests that this change of location is deliberate from python 2.6 onwards. However /usr/lib/python2.6/distutils/command/install.py still makes reference to site-packages which is no doubt where it is coming from.
>
> At this point my Debian python-fu is running low but I think you have
> found a bug in Debian and should report it to them as such.
>
> I also suspect that the fact that distutils is installing
> non-packaged/locally-built python bits in /usr/lib/python2.6 rather
> than /usr/local/lib/python2.6 is also a bug in the python system.

As pointed out above my /usr/local/lib/python2.6/dist-packages does contain xen realated files, but just incase some locally built python stuff realted to xen did end up /usr/lib/python2.6/ I have attached that larger directory listing as well... a simple search for xen returns nothing.


Attachment: ls_listing.txt
Description: Text document

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.