(compiler)
| 430 | replace_method(CCompiler, 'customize_cmd', CCompiler_customize_cmd) |
| 431 | |
| 432 | def _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 | |
| 450 | def CCompiler_show_customization(self): |
| 451 | """ |
no test coverage detected