Commit ac47c0c6 authored by Mike Izbicki's avatar Mike Izbicki

fix to work with python 2.6

I had to make this modification locally to get opencv to build with python 2.6.  Python 2.6 requires indices in the format string (the `0` I added).  This requirement was relaxed in 2.7, so what used to be there would be working for people who could upgrade. I don't think the change has any negative consequences for future python versions, but I'm no expert.
parent 6cb93445
...@@ -861,7 +861,7 @@ class PythonWrapperGenerator(object): ...@@ -861,7 +861,7 @@ class PythonWrapperGenerator(object):
decls = self.parser.parse(hdr) decls = self.parser.parse(hdr)
if len(decls) == 0: if len(decls) == 0:
continue continue
self.code_include.write( '#include "{}"\n'.format(hdr[hdr.rindex('opencv2/'):]) ) self.code_include.write( '#include "{0}"\n'.format(hdr[hdr.rindex('opencv2/'):]) )
for decl in decls: for decl in decls:
name = decl[0] name = decl[0]
if name.startswith("struct") or name.startswith("class"): if name.startswith("struct") or name.startswith("class"):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment