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

Method get_info

numpy/distutils/system_info.py:844–878  ·  view source on GitHub ↗

Return a dictionary with items that are compatible with numpy.distutils.setup keyword arguments.

(self, notfound_action=0)

Source from the content-addressed store, hash-verified

842 return info
843
844 def get_info(self, notfound_action=0):
845 """ Return a dictionary with items that are compatible
846 with numpy.distutils.setup keyword arguments.
847 """
848 flag = 0
849 if not self.has_info():
850 flag = 1
851 log.info(self.__class__.__name__ + ':')
852 if hasattr(self, 'calc_info'):
853 self.calc_info()
854 if notfound_action:
855 if not self.has_info():
856 if notfound_action == 1:
857 warnings.warn(self.notfounderror.__doc__, stacklevel=2)
858 elif notfound_action == 2:
859 raise self.notfounderror(self.notfounderror.__doc__)
860 else:
861 raise ValueError(repr(notfound_action))
862
863 if not self.has_info():
864 log.info(' NOT AVAILABLE')
865 self.set_info()
866 else:
867 log.info(' FOUND:')
868
869 res = self.saved_results.get(self.__class__.__name__)
870 if log.get_threshold() <= log.INFO and flag:
871 for k, v in res.items():
872 v = str(v)
873 if k in ['sources', 'libraries'] and len(v) > 270:
874 v = v[:120] + '...\n...\n...' + v[-120:]
875 log.info(' %s = %s', k, v)
876 log.info('')
877
878 return copy.deepcopy(res)
879
880 def get_paths(self, section, key):
881 dirs = self.cp.get(section, key).split(os.pathsep)

Callers 3

configurationFunction · 0.45
get_infoFunction · 0.45
show_allFunction · 0.45

Calls 6

has_infoMethod · 0.95
set_infoMethod · 0.95
infoMethod · 0.80
warnMethod · 0.80
calc_infoMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected