Fetch all Doxygen sub-config files and gather it with the main config file.
(root_path)
| 26 | |
| 27 | |
| 28 | def doxy_config(root_path): |
| 29 | """ |
| 30 | Fetch all Doxygen sub-config files and gather it with the main config file. |
| 31 | """ |
| 32 | confs = [] |
| 33 | dsrc_path = os.path.join(root_path, "doc", "source") |
| 34 | sub = {'ROOT_DIR': root_path} |
| 35 | with open(os.path.join(dsrc_path, "doxyfile")) as fd: |
| 36 | conf = DoxyTpl(fd.read()) |
| 37 | confs.append(conf.substitute(CUR_DIR=dsrc_path, **sub)) |
| 38 | |
| 39 | for subdir in ["doc", "numpy"]: |
| 40 | for dpath, _, files in os.walk(os.path.join(root_path, subdir)): |
| 41 | if ".doxyfile" not in files: |
| 42 | continue |
| 43 | conf_path = os.path.join(dpath, ".doxyfile") |
| 44 | with open(conf_path) as fd: |
| 45 | conf = DoxyTpl(fd.read()) |
| 46 | confs.append(conf.substitute(CUR_DIR=dpath, **sub)) |
| 47 | return confs |
| 48 | |
| 49 | |
| 50 | if __name__ == "__main__": |