(args)
| 129 | |
| 130 | |
| 131 | def build_doxygen(args): |
| 132 | if not os.path.exists('./Doxyfile-HTML'): |
| 133 | print('No Doxyfile found. Are you in the right directory?') |
| 134 | sys.exit(1) |
| 135 | _, vers, _ = system_with_output(f"{doxygen} -V") |
| 136 | if __DOXYGEN_REQUIRED_VERSION__ not in vers.strip(): |
| 137 | print(f'Please use Doxygen {__DOXYGEN_REQUIRED_VERSION__} to build documentation') |
| 138 | sys.exit(1) |
| 139 | |
| 140 | if args.docset: |
| 141 | stat, _, _ = system_with_output("doxygen2docset --help") |
| 142 | if stat != 0: |
| 143 | print(f"Please install https://github.com/chinmaygarde/doxygen2docset") |
| 144 | sys.exit(1) |
| 145 | |
| 146 | print(f'DOXYGEN VERSION: {vers.strip()}') |
| 147 | |
| 148 | if os.path.exists('./html/'): |
| 149 | print('Clearing ./html/') |
| 150 | try: |
| 151 | shutil.rmtree("./html/") |
| 152 | except OSError: |
| 153 | # doing it twice works (on macOS) ¯\_(ツ)_/¯ |
| 154 | shutil.rmtree("./html/") |
| 155 | print(f'Building doxygen docs...') |
| 156 | |
| 157 | if args.docset: |
| 158 | stat, out, err = system_with_output(f"{doxygen} Doxyfile-Docset") |
| 159 | else: |
| 160 | stat, out, err = system_with_output(f"{doxygen} Doxyfile-HTML") |
| 161 | print(f"Built Doxygen with status code {stat}") |
| 162 | print("Output dir is ./html/") |
| 163 | stat, out, err = system_with_output("cp _static/img/* html/") |
| 164 | print(f"Copied images with status code {stat}") |
| 165 | if args.docset: |
| 166 | stat, out, err = system_with_output("doxygen2docset --doxygen html --docset docset") |
| 167 | print(f"Created docset with status code {stat}") |
| 168 | |
| 169 | |
| 170 | def main(): |
no test coverage detected