cElementTree not found [was: minor typos ...]

Martin Pool mbp at sourcefrog.net
Thu Dec 1 00:37:01 GMT 2005


On 30 Nov 2005, Johannes Grosse <jgrosse at mppmu.mpg.de> wrote:

> >>    How do I check whether bzr falls back to the python version?
> >
> >It should be in ~/.bzr.log.

Oh, I misunderstood the question; I thought you wanted to know what
version of Python it was using.

I have just checked in a fix which puts a warning in ~/.bzr.log if you
are not using cElementTree.  Arguably it should go onto stderr too, but
that might be too noisy.  I hope we can get rid of this dependency in
the near future by storing the inventory and revisions in rio
(rfc-822-like) format.

>   Indeed, 'python setup.py install --home $HOME' copied cElementTree.so to 
> my ~/lib/python dir, which is part of my PYTHONPATH (because bzr required 
> that anyway). The information which flavour of ElementTree is used was not 
> in ~/.bzr.log even after `bzr selftest', so I uncommented the warn('using 
> slower Elementree; ...') line (and the line before which imports the warn 
> command) in `xml.py'. However, now it shows exactly this warning, i.e. it 
> does not seem to be finding cElementTree.
> 
>   I also set LD_LIBRARY_PATH to the ~/lib/python and provided several 
> links to cElementTree.so troughout the bzrlib tree. I know several 
> programming languages, but python is not one of them unfortunately. So 
> this is a dead end to me. I'd stop here and simply use the slow method if 
> I wasn't so curious about the solution :-)

I don't think you should need to do that.  I just removed my system-wide
cElementTree install and did 'python setup.py install --home ~' in the
cElementTree source directory.  bzr now loads it.

Please try this:

 PYTHONPATH=~/lib/python python -c 'import cElementTree;print cElementTree'

-- 
Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20051201/92e44d01/attachment.pgp 


More information about the bazaar mailing list