class_docstr: Abstract base class to define the interface that must be implemented
  by real Fortran compiler classes.
  
  Methods that subclasses may redefine:
  
      update_executables(), find_executables(), get_version()
      get_flags(), get_flags_opt(), get_flags_arch(), get_flags_debug()
      get_flags_f77(), get_flags_opt_f77(), get_flags_arch_f77(),
      get_flags_debug_f77(), get_flags_f90(), get_flags_opt_f90(),
      get_flags_arch_f90(), get_flags_debug_f90(),
      get_flags_fix(), get_flags_linker_so()
  
  DON'T call these methods (except get_version) after
  constructing a compiler instance or inside any other method.
  All methods, except update_executables() and find_executables(),
  may call the get_version() method.
  
  After constructing a compiler instance, always call customize(dist=None)
  method that finalizes compiler construction and makes the following
  attributes available:
    compiler_f77
    compiler_f90
    compiler_fix
    linker_so
    archiver
    ranlib
    libraries
    library_dirs
class_docstr_tok: ["Abstract","base","class","to","define","the","interface","that","must","be","implemented","by","real","Fortran","compiler","classes",".","Methods","that","subclasses","may","redefine",":","update_executables","(",")",",","find_executables","(",")",",","get_version","(",")","get_flags","(",")",",","get_flags_opt","(",")",",","get_flags_arch","(",")",",","get_flags_debug","(",")","get_flags_f77","(",")",",","get_flags_opt_f77","(",")",",","get_flags_arch_f77","(",")",",","get_flags_debug_f77","(",")",",","get_flags_f90","(",")",",","get_flags_opt_f90","(",")",",","get_flags_arch_f90","(",")",",","get_flags_debug_f90","(",")",",","get_flags_fix","(",")",",","get_flags_linker_so","(",")","DO","N'T","call","these","methods","(","except","get_version",")","after","constructing","a","compiler","instance","or","inside","any","other","method",".","All","methods",",","except","update_executables","(",")","and","find_executables","(",")",",","may","call","the","get_version","(",")","method",".","After","constructing","a","compiler","instance",",","always","call","customize","(","dist=None",")","method","that","finalizes","compiler","construction","and","makes","the","following","attributes","available",":","compiler_f77","compiler_f90","compiler_fix","linker_so","archiver","ranlib","libraries","library_dirs"]
docstr: Customize Fortran compiler.
  
  This method gets Fortran compiler specific information from
  (i) class definition, (ii) environment, (iii) distutils config
  files, and (iv) command line (later overrides earlier).
  
  This method should be always called after constructing a
  compiler instance. But not in __init__ because Distribution
  instance is needed for (iii) and (iv).
docstr_tok: ["Customize","Fortran","compiler",".","This","method","gets","Fortran","compiler","specific","information","from","(","i",")","class","definition",",","(","ii",")","environment",",","(","iii",")","distutils","config","files",",","and","(","iv",")","command","line","(","later","overrides","earlier",")",".","This","method","should","be","always","called","after","constructing","a","compiler","instance",".","But","not","in","__init__","because","Distribution","instance","is","needed","for","(","iii",")","and","(","iv",")","."]
code: def customize(self, dist=None):
      """Customize Fortran compiler.
  
      This method gets Fortran compiler specific information from
      (i) class definition, (ii) environment, (iii) distutils config
      files, and (iv) command line (later overrides earlier).
  
      This method should be always called after constructing a
      compiler instance. But not in __init__ because Distribution
      instance is needed for (iii) and (iv).
      """
      log.info("customize %s" % (self.__class__.__name__))
  
      self._is_customised = True
  
      self.distutils_vars.use_distribution(dist)
      self.command_vars.use_distribution(dist)
      self.flag_vars.use_distribution(dist)
  
      self.update_executables()
  
      # find_executables takes care of setting the compiler commands,
      # version_cmd, linker_so, linker_exe, ar, and ranlib
      self.find_executables()
  
      noopt = self.distutils_vars.get("noopt", False)
      noarch = self.distutils_vars.get("noarch", noopt)
      debug = self.distutils_vars.get("debug", False)
  
      f77 = self.command_vars.compiler_f77
      f90 = self.command_vars.compiler_f90
  
      f77flags = []
      f90flags = []
      freeflags = []
      fixflags = []
  
      if f77:
          f77 = _shell_utils.NativeParser.split(f77)
          f77flags = self.flag_vars.f77
      if f90:
          f90 = _shell_utils.NativeParser.split(f90)
          f90flags = self.flag_vars.f90
          freeflags = self.flag_vars.free
      # XXX Assuming that free format is default for f90 compiler.
      fix = self.command_vars.compiler_fix
      # NOTE: this and similar examples are probably just
      # exluding --coverage flag when F90 = gfortran --coverage
      # instead of putting that flag somewhere more appropriate
      # this and similar examples where a Fortran compiler
      # environment variable has been customized by CI or a user
      # should perhaps eventually be more throughly tested and more
      # robustly handled
      if fix:
          fix = _shell_utils.NativeParser.split(fix)
          fixflags = self.flag_vars.fix + f90flags
  
      oflags, aflags, dflags = [], [], []
  
      # examine get_flags_<tag>_<compiler> for extra flags
      # only add them if the method is different from get_flags_<tag>
      def get_flags(tag, flags):
          # note that self.flag_vars.<tag> calls self.get_flags_<tag>()
          flags.extend(getattr(self.flag_vars, tag))
          this_get = getattr(self, "get_flags_" + tag)
          for name, c, flagvar in [
              ("f77", f77, f77flags),
              ("f90", f90, f90flags),
              ("f90", fix, fixflags),
          ]:
              t = "%s_%s" % (tag, name)
              if c and this_get is not getattr(self, "get_flags_" + t):
                  flagvar.extend(getattr(self.flag_vars, t))
  
      if not noopt:
          get_flags("opt", oflags)
          if not noarch:
              get_flags("arch", aflags)
      if debug:
          get_flags("debug", dflags)
  
      fflags = self.flag_vars.flags + dflags + oflags + aflags
  
      if f77:
          self.set_commands(compiler_f77=f77 + f77flags + fflags)
      if f90:
          self.set_commands(
              compiler_f90=f90 + freeflags + f90flags + fflags
          )
      if fix:
          self.set_commands(compiler_fix=fix + fixflags + fflags)
  
      # XXX: Do we need LDSHARED->SOSHARED, LDFLAGS->SOFLAGS
      linker_so = self.linker_so
      if linker_so:
          linker_so_flags = self.flag_vars.linker_so
          if sys.platform.startswith("aix"):
              python_lib = get_python_lib(standard_lib=1)
              ld_so_aix = os.path.join(
                  python_lib, "config", "ld_so_aix"
              )
              python_exp = os.path.join(
                  python_lib, "config", "python.exp"
              )
              linker_so = (
                  [ld_so_aix] + linker_so + ["-bI:" + python_exp]
              )
          self.set_commands(linker_so=linker_so + linker_so_flags)
  
      linker_exe = self.linker_exe
      if linker_exe:
          linker_exe_flags = self.flag_vars.linker_exe
          self.set_commands(linker_exe=linker_exe + linker_exe_flags)
  
      ar = self.command_vars.archiver
      if ar:
          arflags = self.flag_vars.ar
          self.set_commands(archiver=[ar] + arflags)
  
      self.set_library_dirs(self.get_library_dirs())
      self.set_libraries(self.get_libraries())
  
imports: from __future__ import division, absolute_import, print_function
  import os
  import sys
  import re
  import types
  from numpy.compat import open_latin1
  from distutils.sysconfig import get_python_lib
  from distutils.fancy_getopt import FancyGetopt
  from distutils.errors import DistutilsModuleError, DistutilsExecError, CompileError, LinkError, DistutilsPlatformError
  from distutils.util import split_quoted, strtobool
  from numpy.distutils.ccompiler import CCompiler, gen_lib_options
  from numpy.distutils import log
  from numpy.distutils.misc_util import is_string, all_strings, is_sequence, make_temp_file, get_shared_lib_extension
  from numpy.distutils.exec_command import find_executable
  from numpy.distutils.compat import get_exception
  from numpy.distutils import _shell_utils
  from .environment import EnvironmentConfig
label_desc: Use image node_id 25 for calling the FCompiler obj's underlying member method code with example usage: obj.customize(dist) without return types