Skip to content

Commit

Permalink
BUG: Handle modules correctly for F77
Browse files Browse the repository at this point in the history
Closes gh-25263
  • Loading branch information
HaoZeke committed Nov 28, 2023
1 parent e8c5d7b commit 32cfd6d
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions numpy/f2py/f2py2e.py
Original file line number Diff line number Diff line change
Expand Up @@ -455,9 +455,14 @@ def run_main(comline_list):
pyf_files, _ = filter_files("", "[.]pyf([.]src|)", comline_list)
# Checks that no existing modulename is defined in a pyf file
# TODO: Remove all this when scaninputline is replaced
if "-h" not in comline_list and args.module_name: # Can't check what doesn't exist yet, -h creates the pyf
modname = validate_modulename(pyf_files, args.module_name)
comline_list += ['-m', modname] # needed for the rest of scaninputline
if "-h" in comline_list:
modname = args.module_name # Directly use the module name from args
else:
if args.module_name:
modname = validate_modulename(pyf_files, args.module_name)
else:
modname = 'untitled'
comline_list += ['-m', modname] # needed for the rest of scaninputline
# gh-22819 -- end
files, options = scaninputline(comline_list)
auxfuncs.options = options
Expand Down

0 comments on commit 32cfd6d

Please sign in to comment.