From bb7b12672fe7b68c7776a7f757741d4632001bf3 Mon Sep 17 00:00:00 2001 From: xoviat Date: Tue, 30 Jan 2018 17:25:12 -0600 Subject: ENH: Add entry_points for f2py, conv_template, and from_template. (#10463) * Add entry points for f2py and conv-template * Add main function to conv_template * Extract function * Add entry point --- numpy/distutils/from_template.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'numpy/distutils/from_template.py') diff --git a/numpy/distutils/from_template.py b/numpy/distutils/from_template.py index b19c7cc0b..8f587eab9 100644 --- a/numpy/distutils/from_template.py +++ b/numpy/distutils/from_template.py @@ -238,8 +238,7 @@ _special_names = find_repl_patterns(''' ''') -if __name__ == "__main__": - +def main(): try: file = sys.argv[1] except IndexError: @@ -254,3 +253,6 @@ if __name__ == "__main__": allstr = fid.read() writestr = process_str(allstr) outfile.write(writestr) + +if __name__ == "__main__": + main() -- cgit v1.2.1