Fixed file globbing in documentation parsers

This commit is contained in:
Andrey Kamaev
2012-07-05 05:11:15 +00:00
parent acf356b080
commit 5f8715c8b4
2 changed files with 13 additions and 6 deletions

View File

@@ -1,7 +1,7 @@
import os, sys, glob, re
import os, sys, fnmatch, re
sys.path.append("../modules/python/src2/")
sys.path.append("../modules/java/")
sys.path.append("../modules/java/generator")
import hdr_parser as hp
import rst_parser as rp
@@ -185,8 +185,10 @@ def process_module(module, path):
rstparser.parse(module, path)
rst = rstparser.definitions
hdrlist = glob.glob(os.path.join(path, "include", "opencv2", module, "*.h*"))
hdrlist.extend(glob.glob(os.path.join(path, "include", "opencv2", module, "detail", "*.h*")))
hdrlist = []
for root, dirs, files in os.walk(os.path.join(path, "include")):
for filename in fnmatch.filter(files, "*.h*"):
hdrlist.append(os.path.join(root, filename))
if module == "gpu":
hdrlist.append(os.path.join(path, "..", "core", "include", "opencv2", "core", "devmem2d.hpp"))