Description
Here is the implementation:
Lines 18 to 121 in 9340fca
It was lightly amended recently for meson
use in #25111, however there is really very little justification for its (continued) existence. Some thoughts:
- Things shouldn't be in
__init__
- It is essentially a wrapper around
subprocess.run
- Has barely been touched since it was brought in 18 years ago or so (from the
git blame
) - It leaks memory
The only slight functionality it provides is that it can work with a block of text (by generating a temporary file). Additionally, tests for compile
are pretty broken on Windows, and given that it still generates a module file, and the fact that since the meson
transition users cannot use most of the old -c
commands, it is really easier to use externally or be explicit about using subprocess
with environment variables set.
It has always been marked as experimental and subject to change, I would like to therefore remove it ASAP :)
Any user who needs such functionality would be better suited by writing their own thin wrapper over subprocess
based functionality (or use something like sh
).