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

Method get_library_dirs

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

Source from the content-addressed store, hash-verified

174 return libgfortran_dir
175
176 def get_library_dirs(self):
177 opt = []
178 if sys.platform[:5] != 'linux':
179 d = self.get_libgcc_dir()
180 if d:
181 # if windows and not cygwin, libg2c lies in a different folder
182 if sys.platform == 'win32' and not d.startswith('/usr/lib'):
183 d = os.path.normpath(d)
184 path = os.path.join(d, "lib%s.a" % self.g2c)
185 if not os.path.exists(path):
186 root = os.path.join(d, *((os.pardir, ) * 4))
187 d2 = os.path.abspath(os.path.join(root, 'lib'))
188 path = os.path.join(d2, "lib%s.a" % self.g2c)
189 if os.path.exists(path):
190 opt.append(d2)
191 opt.append(d)
192 # For Macports / Linux, libgfortran and libgcc are not co-located
193 lib_gfortran_dir = self.get_libgfortran_dir()
194 if lib_gfortran_dir:
195 opt.append(lib_gfortran_dir)
196 return opt
197
198 def get_libraries(self):
199 opt = []

Callers 1

get_library_dirsMethod · 0.45

Calls 6

get_libgcc_dirMethod · 0.95
get_libgfortran_dirMethod · 0.95
startswithMethod · 0.80
joinMethod · 0.45
existsMethod · 0.45
abspathMethod · 0.45

Tested by

no test coverage detected