code: def run_main(comline_list):
      """
      Equivalent to running::
  
          f2py <args>
  
      where ``<args>=string.join(<list>,' ')``, but in Python.  Unless
      ``-h`` is used, this function returns a dictionary containing
      information on generated modules and their dependencies on source
      files.  For example, the command ``f2py -m scalar scalar.f`` can be
      executed from Python as follows
  
      You cannot build extension modules with this function, that is,
      using ``-c`` is not allowed. Use ``compile`` command instead
  
      Examples
      --------
      .. include:: run_main_session.dat
          :literal:
  
      """
      crackfortran.reset_global_f2py_vars()
      f2pydir = os.path.dirname(os.path.abspath(cfuncs.__file__))
      fobjhsrc = os.path.join(f2pydir, "src", "fortranobject.h")
      fobjcsrc = os.path.join(f2pydir, "src", "fortranobject.c")
      files, options = scaninputline(comline_list)
      auxfuncs.options = options
      postlist = callcrackfortran(files, options)
      isusedby = {}
      for i in range(len(postlist)):
          if "use" in postlist[i]:
              for u in postlist[i]["use"].keys():
                  if u not in isusedby:
                      isusedby[u] = []
                  isusedby[u].append(postlist[i]["name"])
      for i in range(len(postlist)):
          if (
              postlist[i]["block"] == "python module"
              and "__user__" in postlist[i]["name"]
          ):
              if postlist[i]["name"] in isusedby:
                  # if not quiet:
                  outmess(
                      'Skipping Makefile build for module "%s" which is used by %s\n'
                      % (
                          postlist[i]["name"],
                          ",".join(
                              [
                                  '"%s"' % s
                                  for s in isusedby[postlist[i]["name"]]
                              ]
                          ),
                      )
                  )
      if "signsfile" in options:
          if options["verbose"] > 1:
              outmess(
                  "Stopping. Edit the signature file and then run f2py on the signature file: "
              )
              outmess(
                  "%s %s\n"
                  % (
                      os.path.basename(sys.argv[0]),
                      options["signsfile"],
                  )
              )
          return
      for i in range(len(postlist)):
          if postlist[i]["block"] != "python module":
              if "python module" not in options:
                  errmess(
                      "Tip: If your original code is Fortran source then you must use -m option.\n"
                  )
              raise TypeError(
                  "All blocks must be python module blocks but got %s"
                  % (repr(postlist[i]["block"]))
              )
      auxfuncs.debugoptions = options["debug"]
      f90mod_rules.options = options
      auxfuncs.wrapfuncs = options["wrapfuncs"]
  
      ret = buildmodules(postlist)
  
      for mn in ret.keys():
          dict_append(ret[mn], {"csrc": fobjcsrc, "h": fobjhsrc})
      return ret
  
imports: from __future__ import division, absolute_import, print_function
  import sys
  import os
  import pprint
  import re
  from .None import crackfortran
  from .None import rules
  from .None import cb_rules
  from .None import auxfuncs
  from .None import cfuncs
  from .None import f90mod_rules
  from .None import __version__
label_desc: Use image node_id 5 for calling a global function with example usage: run_main(comline_list) and returns: ret