MCPcopy Create free account
hub / github.com/numpy/numpy / FCompiler

Class FCompiler

numpy/distutils/fcompiler/__init__.py:62–751  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

60 return is_sequence(seq) and all_strings(seq)
61
62class FCompiler(CCompiler):
63 """Abstract base class to define the interface that must be implemented
64 by real Fortran compiler classes.
65
66 Methods that subclasses may redefine:
67
68 update_executables(), find_executables(), get_version()
69 get_flags(), get_flags_opt(), get_flags_arch(), get_flags_debug()
70 get_flags_f77(), get_flags_opt_f77(), get_flags_arch_f77(),
71 get_flags_debug_f77(), get_flags_f90(), get_flags_opt_f90(),
72 get_flags_arch_f90(), get_flags_debug_f90(),
73 get_flags_fix(), get_flags_linker_so()
74
75 DON'T call these methods (except get_version) after
76 constructing a compiler instance or inside any other method.
77 All methods, except update_executables() and find_executables(),
78 may call the get_version() method.
79
80 After constructing a compiler instance, always call customize(dist=None)
81 method that finalizes compiler construction and makes the following
82 attributes available:
83 compiler_f77
84 compiler_f90
85 compiler_fix
86 linker_so
87 archiver
88 ranlib
89 libraries
90 library_dirs
91 """
92
93 # These are the environment variables and distutils keys used.
94 # Each configuration description is
95 # (<hook name>, <environment variable>, <key in distutils.cfg>, <convert>, <append>)
96 # The hook names are handled by the self._environment_hook method.
97 # - names starting with 'self.' call methods in this class
98 # - names starting with 'exe.' return the key in the executables dict
99 # - names like 'flags.YYY' return self.get_flag_YYY()
100 # convert is either None or a function to convert a string to the
101 # appropriate type used.
102
103 distutils_vars = EnvironmentConfig(
104 distutils_section='config_fc',
105 noopt = (None, None, 'noopt', str2bool, False),
106 noarch = (None, None, 'noarch', str2bool, False),
107 debug = (None, None, 'debug', str2bool, False),
108 verbose = (None, None, 'verbose', str2bool, False),
109 )
110
111 command_vars = EnvironmentConfig(
112 distutils_section='config_fc',
113 compiler_f77 = ('exe.compiler_f77', 'F77', 'f77exec', None, False),
114 compiler_f90 = ('exe.compiler_f90', 'F90', 'f90exec', None, False),
115 compiler_fix = ('exe.compiler_fix', 'F90', 'f90exec', None, False),
116 version_cmd = ('exe.version_cmd', None, None, None, False),
117 linker_so = ('exe.linker_so', 'LDSHARED', 'ldshared', None, False),
118 linker_exe = ('exe.linker_exe', 'LD', 'ld', None, False),
119 archiver = (None, 'AR', 'ar', None, False),

Callers

nothing calls this directly

Calls 2

get_shared_lib_extensionFunction · 0.90
EnvironmentConfigClass · 0.85

Tested by

no test coverage detected