(tool, filename, cwd=None, **kwargs)
| 51 | |
| 52 | |
| 53 | def preprocess(tool, filename, cwd=None, **kwargs): |
| 54 | argv = _build_argv(tool, filename, **kwargs) |
| 55 | logger.debug(' '.join(shlex.quote(v) for v in argv)) |
| 56 | |
| 57 | # Make sure the OS is supported for this file. |
| 58 | if (_expected := is_os_mismatch(filename)): |
| 59 | error = None |
| 60 | raise OSMismatchError(filename, _expected, argv, error, TOOL) |
| 61 | |
| 62 | # Run the command. |
| 63 | with converted_error(tool, argv, filename): |
| 64 | # We use subprocess directly here, instead of calling the |
| 65 | # distutil compiler object's preprocess() method, since that |
| 66 | # one writes to stdout/stderr and it's simpler to do it directly |
| 67 | # through subprocess. |
| 68 | return run_cmd(argv, cwd=cwd) |
| 69 | |
| 70 | |
| 71 | def _build_argv( |
nothing calls this directly
no test coverage detected
searching dependent graphs…