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

Method calc_libraries_info

numpy/distutils/system_info.py:753–782  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

751 self.cp.add_section(self.section)
752
753 def calc_libraries_info(self):
754 libs = self.get_libraries()
755 dirs = self.get_lib_dirs()
756 # The extensions use runtime_library_dirs
757 r_dirs = self.get_runtime_lib_dirs()
758 # Intrinsic distutils use rpath, we simply append both entries
759 # as though they were one entry
760 r_dirs.extend(self.get_runtime_lib_dirs(key='rpath'))
761 info = {}
762 for lib in libs:
763 i = self.check_libs(dirs, [lib])
764 if i is not None:
765 dict_append(info, **i)
766 else:
767 log.info('Library %s was not found. Ignoring' % (lib))
768
769 if r_dirs:
770 i = self.check_libs(r_dirs, [lib])
771 if i is not None:
772 # Swap library keywords found to runtime_library_dirs
773 # the libraries are insisting on the user having defined
774 # them using the library_dirs, and not necessarily by
775 # runtime_library_dirs
776 del i['libraries']
777 i['runtime_library_dirs'] = i.pop('library_dirs')
778 dict_append(info, **i)
779 else:
780 log.info('Runtime library %s was not found. Ignoring' % (lib))
781
782 return info
783
784 def set_info(self, **info):
785 if info:

Callers 2

set_infoMethod · 0.95

Calls 6

get_librariesMethod · 0.95
get_lib_dirsMethod · 0.95
get_runtime_lib_dirsMethod · 0.95
check_libsMethod · 0.95
infoMethod · 0.80
dict_appendFunction · 0.70

Tested by

no test coverage detected