[C++-sig] Problems with boost tuples to python conversion

Maciej Sitarz macieksitarz at wp.pl
Thu Apr 29 10:03:33 CEST 2010


As I described it before I tried it, but gccxml couldn't parse the 
tuples.hpp file.

I build gccxml from CVS ver. 0.9( 1.134 ) and it parsed the source file 
successfully. That's a big progress since the last time.
But now... there's some problem with pygccxml I think :|

I get the following error:

$ python generate.py
INFO Parsing source file "problem.h" ...
INFO gccxml cmd: /usr/bin/gccxml  -I"." 
-I"/home/macieks/error_examples/boost_tuples_to_python2" 
-I"/usr/include" -I"/usr/include/python2.4" 
-I"/home/macieks/boost/boost_1_42_0"   "problem.h" 
-fxml="/tmp/tmp80gNLk.xml"
INFO GCCXML version - 0.9( 1.134 )
INFO Parsing source file "tuples.hpp" ...
INFO gccxml cmd: /usr/bin/gccxml  -I"." 
-I"/home/macieks/error_examples/boost_tuples_to_python2" 
-I"/usr/include" -I"/usr/include/python2.4" 
-I"/home/macieks/boost/boost_1_42_0"   "tuples.hpp" 
-fxml="/tmp/tmpkNs2uu.xml"
INFO GCCXML version - 0.9( 1.134 )
Traceback (most recent call last):
   File "generate.py", line 17, in ?
     indexing_suite_version=2
   File 
"usr/lib/python2.4/site-packages/pyplusplus/module_builder/boost_python_builder.py", 
line 95, in __init__
   File 
"usr/lib/python2.4/site-packages/pyplusplus/module_builder/boost_python_builder.py", 
line 138, in __parse_declarations
   File 
"usr/lib/python2.4/site-packages/pygccxml/parser/project_reader.py", 
line 217, in read_files
   File 
"usr/lib/python2.4/site-packages/pygccxml/parser/project_reader.py", 
line 272, in __parse_file_by_file
   File 
"usr/lib/python2.4/site-packages/pygccxml/parser/project_reader.py", 
line 445, in _join_class_hierarchy
KeyError: 
((u'/home/macieks/boost/boost_1_42_0/boost/type_traits/is_function.hpp', 
52), (u'::', u'boost', u'detail', u'is_function_chooser<false>', 
u'result_<long long>'))

generate.py and problem.h attached

Best regards
-- 
Maciek Sitarz
-------------- next part --------------
A non-text attachment was scrubbed...
Name: generate.py
Type: text/x-python
Size: 1197 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20100429/442b9fc0/attachment.py>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: problem.h
Type: text/x-chdr
Size: 1211 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20100429/442b9fc0/attachment.h>


More information about the Cplusplus-sig mailing list