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

Method get_libgfortran_dir

numpy/distutils/fcompiler/gnu.py:155–174  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

153 return None
154
155 def get_libgfortran_dir(self):
156 if sys.platform[:5] == 'linux':
157 libgfortran_name = 'libgfortran.so'
158 elif sys.platform == 'darwin':
159 libgfortran_name = 'libgfortran.dylib'
160 else:
161 libgfortran_name = None
162
163 libgfortran_dir = None
164 if libgfortran_name:
165 find_lib_arg = ['-print-file-name={0}'.format(libgfortran_name)]
166 try:
167 output = subprocess.check_output(
168 self.compiler_f77 + find_lib_arg)
169 except (OSError, subprocess.CalledProcessError):
170 pass
171 else:
172 output = filepath_from_subprocess_output(output)
173 libgfortran_dir = os.path.dirname(output)
174 return libgfortran_dir
175
176 def get_library_dirs(self):
177 opt = []

Callers 2

get_library_dirsMethod · 0.95
get_library_dirsMethod · 0.80

Calls 2

check_outputMethod · 0.45

Tested by

no test coverage detected