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

Method calc_info

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

Source from the content-addressed store, hash-verified

2778 default_include_dirs=include_dirs)
2779
2780 def calc_info(self):
2781 try:
2782 module = __import__(self.modulename)
2783 except ImportError:
2784 return
2785 info = {}
2786 macros = []
2787 for v in ['__version__', 'version']:
2788 vrs = getattr(module, v, None)
2789 if vrs is None:
2790 continue
2791 macros = [(self.modulename.upper() + '_VERSION',
2792 _c_string_literal(vrs)),
2793 (self.modulename.upper(), None)]
2794 break
2795 dict_append(info, define_macros=macros)
2796 include_dirs = self.get_include_dirs()
2797 inc_dir = None
2798 for d in include_dirs:
2799 if self.combine_paths(d,
2800 os.path.join(self.modulename,
2801 'arrayobject.h')):
2802 inc_dir = d
2803 break
2804 if inc_dir is not None:
2805 dict_append(info, include_dirs=[inc_dir])
2806 if info:
2807 self.set_info(**info)
2808 return
2809
2810
2811class numarray_info(_numpy_info):

Callers

nothing calls this directly

Calls 7

_c_string_literalFunction · 0.85
upperMethod · 0.80
get_include_dirsMethod · 0.80
combine_pathsMethod · 0.80
set_infoMethod · 0.80
dict_appendFunction · 0.70
joinMethod · 0.45

Tested by

no test coverage detected