Update '#!/usr/bin/python' shebangs to '#!/usr/bin/env python'.
Python2 has been considered obsolete since 2020-01-01. Some Linux
distributions are increasingly moving away from installing a
Python2 binary in `/usr/bin/python`, which means that any
Unix shebang lines that refer to it will stop working.
This CL changes (almost) all of the shebang lines found in
chromium/src to use `#!/usr/bin/env python` instead, which is
more portable (it allows you to have your own Python as long as
it is simply somewhere in $PATH). There are a few cases where
I did not update the changes because they were in third_party
The actual command used to generate this CL was:
git grep -l '^#!\s*/usr/bin/python$' -- \*.py | egrep -v 'external/wpt|third_party/(abseil-cpp|android_platform|libxml|closure_compiler|google_input_tools|libxml|mako|opus|protobuf|wpt_tools|zxcvbn-cpp)' | xargs perl -pi -e 's-^#!/usr/bin/python-#!/usr/bin/env python-'
Commit-Queue: Dirk Pranke <email@example.com>
Reviewed-by: Nico Weber <firstname.lastname@example.org>
Reviewed-by: Kentaro Hara <email@example.com>
Owners-Override: Kentaro Hara <firstname.lastname@example.org>
Owners-Override: Nico Weber <email@example.com>
2 files changed