class documentation

class FCompiler(CCompiler):

Known subclasses: numpy.distutils.fcompiler.absoft.AbsoftFCompiler, numpy.distutils.fcompiler.arm.ArmFlangCompiler, numpy.distutils.fcompiler.compaq.CompaqFCompiler, numpy.distutils.fcompiler.compaq.CompaqVisualFCompiler, numpy.distutils.fcompiler.fujitsu.FujitsuFCompiler, numpy.distutils.fcompiler.g95.G95FCompiler, numpy.distutils.fcompiler.gnu.GnuFCompiler, numpy.distutils.fcompiler.hpux.HPUXFCompiler, numpy.distutils.fcompiler.ibm.IBMFCompiler, numpy.distutils.fcompiler.intel.BaseIntelFCompiler, numpy.distutils.fcompiler.lahey.LaheyFCompiler, numpy.distutils.fcompiler.mips.MIPSFCompiler, numpy.distutils.fcompiler.nag.BaseNAGFCompiler, numpy.distutils.fcompiler.none.NoneFCompiler, numpy.distutils.fcompiler.nv.NVHPCFCompiler, numpy.distutils.fcompiler.pathf95.PathScaleFCompiler, numpy.distutils.fcompiler.pg.PGroupFCompiler, numpy.distutils.fcompiler.pg.PGroupFlangCompiler, numpy.distutils.fcompiler.sun.SunFCompiler

View In Hierarchy

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
Method __copy__ Undocumented
Method __init__ Undocumented
Method ​_command​_property Undocumented
Method ​_compile Compile 'src' to product 'obj'.
Method ​_environment​_hook Undocumented
Method ​_get​_command​_flags Undocumented
Method can​_ccompiler​_link Check if the given C compiler can link objects produced by this compiler.
Method copy Undocumented
Method customize Customize Fortran compiler.
Method dump​_properties Print out the attributes of a compiler instance.
Method find​_executables Go through the self.executables dictionary, and attempt to find and assign appropriate executables.
Method get​_flags List of flags common to all compiler types.
Method get​_flags​_ar List of archiver flags.
Method get​_flags​_arch List of architecture dependent compiler flags.
Method get​_flags​_debug List of compiler flags to compile with debugging information.
Method get​_flags​_f77 List of Fortran 77 specific flags.
Method get​_flags​_f90 List of Fortran 90 specific flags.
Method get​_flags​_fix List of Fortran 90 fixed format specific flags.
Method get​_flags​_free List of Fortran 90 free format specific flags.
Method get​_flags​_linker​_exe List of linker flags to build an executable.
Method get​_flags​_linker​_so List of linker flags to build a shared library.
Method get​_flags​_opt List of architecture independent compiler flags.
Method get​_libraries List of compiler libraries.
Method get​_library​_dirs List of compiler library directories.
Method get​_version Undocumented
Method library​_dir​_option Undocumented
Method library​_option Undocumented
Method link Undocumented
Method module​_options Undocumented
Method set​_command Undocumented
Method set​_commands Undocumented
Method set​_executable Undocumented
Method update​_executables Called at the beginning of customisation. Subclasses should override this if they need to set up the executables dictionary.
Method wrap​_unlinkable​_objects Convert a set of object files that are not compatible with the default linker, to a file that is compatible.
Class Variable ​_exe​_cache Undocumented
Class Variable ​_executable​_keys Undocumented
Class Variable archiver Undocumented
Class Variable c​_compiler Undocumented
Class Variable compile​_switch Undocumented
Class Variable compiler​_aliases Undocumented
Class Variable compiler​_f77 Undocumented
Class Variable compiler​_f90 Undocumented
Class Variable compiler​_fix Undocumented
Class Variable compiler​_type Undocumented
Class Variable exe​_extension Undocumented
Class Variable extra​_f77​_compile​_args Undocumented
Class Variable extra​_f90​_compile​_args Undocumented
Class Variable language​_map Undocumented
Class Variable language​_order Undocumented
Class Variable library​_switch Undocumented
Class Variable linker​_exe Undocumented
Class Variable linker​_so Undocumented
Class Variable module​_dir​_switch Undocumented
Class Variable module​_include​_switch Undocumented
Class Variable obj​_extension Undocumented
Class Variable object​_switch Undocumented
Class Variable pic​_flags Undocumented
Class Variable possible​_executables Undocumented
Class Variable ranlib Undocumented
Class Variable shared​_lib​_extension Undocumented
Class Variable shared​_lib​_format Undocumented
Class Variable src​_extensions Undocumented
Class Variable static​_lib​_extension Undocumented
Class Variable static​_lib​_format Undocumented
Class Variable suggested​_f90​_compiler Undocumented
Class Variable version​_cmd Undocumented
Class Variable version​_pattern Undocumented
Instance Variable ​_is​_customised Undocumented
Instance Variable command​_vars Undocumented
Instance Variable distutils​_vars Undocumented
Instance Variable executables Undocumented
Instance Variable flag​_vars Undocumented
def __copy__(self):

Undocumented

def __init__(self, *args, **kw):

Undocumented

def _command_property(key):

Undocumented

def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts):
Compile 'src' to product 'obj'.
def _environment_hook(self, name, hook_name):

Undocumented

def _get_command_flags(self, key):

Undocumented

def can_ccompiler_link(self, ccompiler):
Check if the given C compiler can link objects produced by this compiler.
def copy(self):

Undocumented

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).

def dump_properties(self):
Print out the attributes of a compiler instance.
def find_executables(self):

Go through the self.executables dictionary, and attempt to find and assign appropriate executables.

Executable names are looked for in the environment (environment variables, the distutils.cfg, and command line), the 0th-element of the command list, and the self.possible_executables list.

Also, if the 0th element is "<F77>" or "<F90>", the Fortran 77 or the Fortran 90 compiler executable is used, unless overridden by an environment setting.

Subclasses should call this if overridden.

def get_flags_ar(self):
List of archiver flags.
def get_flags_f77(self):
def get_flags_f90(self):
List of Fortran 90 specific flags.
def get_flags_fix(self):
List of Fortran 90 fixed format specific flags.
def get_flags_linker_exe(self):
List of linker flags to build an executable.
def get_version(self, force=False, ok_status=[0]):
def library_dir_option(self, dir):
def library_option(self, lib):
def link(self, target_desc, objects, output_filename, output_dir=None, libraries=None, library_dirs=None, runtime_library_dirs=None, export_symbols=None, debug=0, extra_preargs=None, extra_postargs=None, build_temp=None, target_lang=None):

Undocumented

def module_options(self, module_dirs, module_build_dir):

Undocumented

def set_command(self, key, value):

Undocumented

def set_commands(self, **kw):

Undocumented

def set_executable(self, key, value):

Undocumented

def update_executables(self):

Called at the beginning of customisation. Subclasses should override this if they need to set up the executables dictionary.

Note that self.find_executables() is run afterwards, so the self.executables dictionary values can contain <F77> or <F90> as the command, which will be replaced by the found F77 or F90 compiler.

def wrap_unlinkable_objects(self, objects, output_dir, extra_dll_dir):

Convert a set of object files that are not compatible with the default linker, to a file that is compatible.

Parameters

objects : list
List of object files to include.
output_dir : str
Output directory to place generated object files.
extra_dll_dir : str
Output directory to place extra DLL files that need to be included on Windows.

Returns

converted_objects : list of str
List of converted object files. Note that the number of output files is not necessarily the same as inputs.
_exe_cache: dict =

Undocumented

_executable_keys: list[str] =

Undocumented

archiver =

Undocumented

c_compiler =
compiler_f77 =

Undocumented

compiler_f90 =

Undocumented

compiler_fix =

Undocumented

exe_extension: str =

Undocumented

extra_f77_compile_args: list =

Undocumented

extra_f90_compile_args: list =

Undocumented

language_map: dict[str, str] =

Undocumented

language_order: list[str] =

Undocumented

linker_exe =

Undocumented

linker_so =

Undocumented

obj_extension: str =

Undocumented

ranlib =

Undocumented

shared_lib_extension =

Undocumented

shared_lib_format: str =

Undocumented

src_extensions: list[str] =

Undocumented

static_lib_extension: str =
static_lib_format: str =
suggested_f90_compiler =

Undocumented

version_cmd =

Undocumented

_is_customised: bool =

Undocumented

command_vars =

Undocumented

distutils_vars =

Undocumented

flag_vars =

Undocumented