MCPcopy Create free account
hub / github.com/numpy/numpy / main

Function main

numpy/_build_utils/tempita.py:32–58  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

30
31
32def main():
33 parser = argparse.ArgumentParser()
34 parser.add_argument(
35 "infile",
36 type=str,
37 help="Path to the input file"
38 )
39 parser.add_argument(
40 "-o",
41 "--outfile",
42 type=str,
43 help="Path to the output file"
44 )
45 parser.add_argument(
46 "-i",
47 "--ignore",
48 type=str,
49 help="An ignored input - may be useful to add a "
50 "dependency between custom targets",
51 )
52 args = parser.parse_args()
53
54 if not args.infile.endswith('.in'):
55 raise ValueError(f"Unexpected extension: {args.infile}")
56
57 outfile_abs = os.path.join(os.getcwd(), args.outfile)
58 process_tempita(args.infile, outfile_abs)
59
60
61if __name__ == "__main__":

Callers 1

tempita.pyFile · 0.70

Calls 3

process_tempitaFunction · 0.85
endswithMethod · 0.80
joinMethod · 0.45

Tested by

no test coverage detected