[pkg-boost-devel] Boost packages

Steve M. Robbins steve at sumost.ca
Mon Feb 21 04:48:01 UTC 2011


Hi Wichert,

On Sun, Feb 20, 2011 at 10:43:19PM +0100, Wichert Akkerman wrote:

> I haven't looked at the 1.46 code yet, but in case
> it's useful: the pyste code in 1.45 is not compatible with python
> 2.6. Trying to run it gives this error:
> 
> Traceback (most recent call last):
>   File "/usr/bin/pyste", line 7, in <module>
>     from Pyste import pyste
>   File "/usr/lib/pymodules/python2.6/Pyste/pyste.py", line 53, in <module>
>     from CppParser import CppParser, CppParserError
>   File "/usr/lib/pymodules/python2.6/Pyste/CppParser.py", line 6, in
> <module>
>     from GCCXMLParser import ParseDeclarations
>   File "/usr/lib/pymodules/python2.6/Pyste/GCCXMLParser.py", line
> 12, in <module>
>     from elementtree.ElementTree import ElementTree
> ImportError: No module named elementtree.ElementTree
> 
> the correct import for python 2.6 is xml.etree.ElementTree.

I believe you'll find that GCCXMLParser tries to import
ElementTree from three different places:

try:
	# try to use internal elementtree
    from xml.etree.cElementTree import ElementTree
except ImportError:
    # try to use cElementTree if avaiable
    try:
        from cElementTree import ElementTree    
    except ImportError:
        # fall back to the normal elementtree
        from elementtree.ElementTree import ElementTree

On my system, python2.6 provides cElementTree.py:

  python2.6: /usr/lib/python2.6/xml/etree/cElementTree.py

and "pyste" works without error:

Can you dig a bit further and let me know if I'm missing
something?

Thanks,
-Steve
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-boost-devel/attachments/20110220/99abe197/attachment.pgp>


More information about the pkg-boost-devel mailing list