On 13/01/21 11:31, Daniel P. Berrangé wrote:
- because we need to run the script to generate the full help, we
cannot rely on the user supplying the path to a Python interpreter
with --python. For this reason, the script is written in Perl.
Perl 5 is universally available as "/usr/bin/env perl", while
(even ignoring the Python 2/3 difference) some systems do not
have a "python" or "python3" binary on the path.
Can't we just use "/usr/bin/env python3", and if that doesn't
exist in $PATH, simply show truncated --help output, with a
message requesting that they pass --python to see full help.
We can and it's what the RFC did, but I found it to be ugly for the
user. For example the rest of the build defaults not to "/usr/bin/env
python3" but to whatever Python interpreter /usr/bin/meson uses.
Not that Perl is pretty, :) but developer ugliness ranks a notch lower
than user-visible ugliness. I cannot think of anything else that is
already required to build QEMU and can parse JSON.
I don't expect this script to see any change ever, except for
occasionally updating SKIP_OPTIONS. Meson introspection data is
backwards-compatible.
Paolo