MCPcopy Index your code
hub / github.com/numpy/numpy / callcrackfortran

Function callcrackfortran

numpy/f2py/f2py2e.py:338–378  ·  view source on GitHub ↗
(files, options)

Source from the content-addressed store, hash-verified

336
337
338def callcrackfortran(files, options):
339 rules.options = options
340 crackfortran.debug = options['debug']
341 crackfortran.verbose = options['verbose']
342 if 'module' in options:
343 crackfortran.f77modulename = options['module']
344 if 'skipfuncs' in options:
345 crackfortran.skipfuncs = options['skipfuncs']
346 if 'onlyfuncs' in options:
347 crackfortran.onlyfuncs = options['onlyfuncs']
348 crackfortran.include_paths[:] = options['include_paths']
349 crackfortran.dolowercase = options['do-lower']
350 postlist = crackfortran.crackfortran(files)
351 if 'signsfile' in options:
352 outmess(f"Saving signatures to file \"{options['signsfile']}\"\n")
353 pyf = crackfortran.crack2fortran(postlist)
354 if options['signsfile'][-6:] == 'stdout':
355 sys.stdout.write(pyf)
356 else:
357 with open(options['signsfile'], 'w') as f:
358 f.write(pyf)
359 if options["coutput"] is None:
360 for mod in postlist:
361 mod["coutput"] = f"{mod['name']}module.c"
362 else:
363 for mod in postlist:
364 mod["coutput"] = options["coutput"]
365 if options["f2py_wrapper_output"] is None:
366 for mod in postlist:
367 mod["f2py_wrapper_output"] = f"{mod['name']}-f2pywrappers.f"
368 else:
369 for mod in postlist:
370 mod["f2py_wrapper_output"] = options["f2py_wrapper_output"]
371 for mod in postlist:
372 if options["requires_gil"]:
373 mod['gil_used'] = 'Py_MOD_GIL_USED'
374 else:
375 mod['gil_used'] = 'Py_MOD_GIL_NOT_USED'
376 # gh-26718 Reset global
377 crackfortran.f77modulename = ''
378 return postlist
379
380
381def buildmodules(lst):

Callers 1

run_mainFunction · 0.85

Calls 3

openFunction · 0.85
outmessFunction · 0.70
writeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…