automatic search for headers for python wrapper generation

This commit is contained in:
Alexander Mordvintsev
2014-07-22 12:36:36 +04:00
committed by Alexander Mordvintsev
parent 7da0e37ba8
commit 1d1bfd3d7d
2 changed files with 20 additions and 25 deletions

View File

@@ -831,8 +831,10 @@ class PythonWrapperGenerator(object):
# step 1: scan the headers and build more descriptive maps of classes, consts, functions
for hdr in srcfiles:
self.code_include.write( '#include "{}"\n'.format(hdr[hdr.rindex('opencv2/'):]) )
decls = parser.parse(hdr)
if len(decls) == 0:
continue
self.code_include.write( '#include "{}"\n'.format(hdr[hdr.rindex('opencv2/'):]) )
for decl in decls:
name = decl[0]
if name.startswith("struct") or name.startswith("class"):