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

Function _compiler_to_string

numpy/distutils/ccompiler.py:432–448  ·  view source on GitHub ↗
(compiler)

Source from the content-addressed store, hash-verified

430replace_method(CCompiler, 'customize_cmd', CCompiler_customize_cmd)
431
432def _compiler_to_string(compiler):
433 props = []
434 mx = 0
435 keys = list(compiler.executables.keys())
436 for key in ['version', 'libraries', 'library_dirs',
437 'object_switch', 'compile_switch',
438 'include_dirs', 'define', 'undef', 'rpath', 'link_objects']:
439 if key not in keys:
440 keys.append(key)
441 for key in keys:
442 if hasattr(compiler, key):
443 v = getattr(compiler, key)
444 mx = max(mx, len(key))
445 props.append((key, repr(v)))
446 fmt = '%-' + repr(mx+1) + 's = %s'
447 lines = [fmt % prop for prop in props]
448 return '\n'.join(lines)
449
450def CCompiler_show_customization(self):
451 """

Callers 1

Calls 3

keysMethod · 0.80
maxFunction · 0.50
joinMethod · 0.45

Tested by

no test coverage detected