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

Method calc_ver_info

numpy/distutils/system_info.py:1111–1136  ·  view source on GitHub ↗

Returns True on successful version detection, else False

(self, ver_param)

Source from the content-addressed store, hash-verified

1109 'macros':[('SCIPY_FFTW_H', None)]}]
1110
1111 def calc_ver_info(self, ver_param):
1112 """Returns True on successful version detection, else False"""
1113 lib_dirs = self.get_lib_dirs()
1114 incl_dirs = self.get_include_dirs()
1115
1116 opt = self.get_option_single(self.section + '_libs', 'libraries')
1117 libs = self.get_libs(opt, ver_param['libs'])
1118 info = self.check_libs(lib_dirs, libs)
1119 if info is not None:
1120 flag = 0
1121 for d in incl_dirs:
1122 if len(self.combine_paths(d, ver_param['includes'])) \
1123 == len(ver_param['includes']):
1124 dict_append(info, include_dirs=[d])
1125 flag = 1
1126 break
1127 if flag:
1128 dict_append(info, define_macros=ver_param['macros'])
1129 else:
1130 info = None
1131 if info is not None:
1132 self.set_info(**info)
1133 return True
1134 else:
1135 log.info(' %s not found' % (ver_param['name']))
1136 return False
1137
1138 def calc_info(self):
1139 for i in self.ver_info:

Callers 1

calc_infoMethod · 0.95

Calls 9

get_lib_dirsMethod · 0.80
get_include_dirsMethod · 0.80
get_option_singleMethod · 0.80
get_libsMethod · 0.80
check_libsMethod · 0.80
combine_pathsMethod · 0.80
set_infoMethod · 0.80
infoMethod · 0.80
dict_appendFunction · 0.70

Tested by

no test coverage detected