Use python3 shebang for all python scripts
The `python` command may not exist on a system with Python 3 installed. See https://peps.python.org/pep-0394/ for a discussion of the commands expected to be installed. Since Python2 was officially sunsetted almost three years ago (https://www.python.org/doc/sunset-python-2/), IWYU should prefer compatibility with newer systems over older ones. Python code in scripts is still Python3/Python2-compatible, but we will no longer make an effort to preserve Python2 support over time. Fixes #1096.
This commit is contained in:
parent
616927dec4
commit
e4dd555000
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/env python
|
||||
#!/usr/bin/env python3
|
||||
|
||||
##===--- fix_includes.py - rewrite source files based on iwyu output ------===##
|
||||
#
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/env python
|
||||
#!/usr/bin/env python3
|
||||
|
||||
##===--- fix_includes_test.py - test for fix_includes.py ------------------===##
|
||||
#
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/env python
|
||||
#!/usr/bin/env python3
|
||||
|
||||
##===--- iwyu-check-license-header.py - check license headers -------------===##
|
||||
#
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/env python
|
||||
#!/usr/bin/env python3
|
||||
|
||||
##===--- iwyu_test_util.py - include-what-you-use test framework ----------===##
|
||||
#
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/env python
|
||||
#!/usr/bin/env python3
|
||||
|
||||
##===--- iwyu_tool.py -----------------------------------------------------===##
|
||||
#
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/env python
|
||||
#!/usr/bin/env python3
|
||||
|
||||
##===--- iwyu_tool_test.py - test for iwyu_tool.py ------------------------===##
|
||||
#
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/env python
|
||||
#!/usr/bin/env python3
|
||||
|
||||
##===--- iwyu-mapgen-cpython.py -------------------------------------------===##
|
||||
#
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/env python
|
||||
#!/usr/bin/env python3
|
||||
|
||||
##===--- iwyu-mapgen-qt.py ------------------------------------------------===##
|
||||
#
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/env python
|
||||
#!/usr/bin/env python3
|
||||
|
||||
##===--- run_iwyu_tests.py - include-what-you-use test framework driver ---===##
|
||||
#
|
||||
|
@ -52,7 +52,7 @@ def TestIwyuOnRelevantFiles(filename):
|
|||
glob.glob('%s/*/%s-*' % (dirname, basename)) +
|
||||
glob.glob('%s.h' % all_but_extension) +
|
||||
glob.glob('%s/*/%s.h' % (dirname, basename)))
|
||||
|
||||
|
||||
files_to_check = [f for f in all_files if not f.endswith(extension)]
|
||||
files_to_check.append(filename)
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/env python
|
||||
#!/usr/bin/env python3
|
||||
|
||||
##===--- scrub-logs.py - generate README from Wiki sources ----------------===##
|
||||
#
|
||||
|
|
Loading…
Reference in New Issue