()
| 1397 | |
| 1398 | |
| 1399 | def main(): |
| 1400 | parser = argparse.ArgumentParser() |
| 1401 | parser.add_argument( |
| 1402 | "-o", |
| 1403 | "--outfile", |
| 1404 | type=str, |
| 1405 | help="Path to the output directory" |
| 1406 | ) |
| 1407 | args = parser.parse_args() |
| 1408 | |
| 1409 | # used to insert the name of this file into the generated file |
| 1410 | filename = __file__ |
| 1411 | code = make_code(defdict, filename) |
| 1412 | |
| 1413 | if not args.outfile: |
| 1414 | # This is the distutils-based build |
| 1415 | outfile = '__umath_generated.c' |
| 1416 | else: |
| 1417 | outfile = os.path.join(os.getcwd(), args.outfile) |
| 1418 | |
| 1419 | with open(outfile, 'w') as f: |
| 1420 | f.write(code) |
| 1421 | |
| 1422 | |
| 1423 | if __name__ == "__main__": |
no test coverage detected