[clang-tools-extra] [clang-tools-extra] Unify python shebangs (PR #187287)
Ross Burton via cfe-commits
cfe-commits at lists.llvm.org
Wed Mar 18 07:35:36 PDT 2026
https://github.com/rossburton created https://github.com/llvm/llvm-project/pull/187287
As per PEP-0394[1], there is no real concensus over what binary names Python has, specifically 'python' could be Python 3, Python 2, or not exist.
However, everyone has a python3 interpreter and the scripts are all written for Python 3. Unify the shebangs so that the ~50% of shebangs that use python now use python3.
[1] https://peps.python.org/pep-0394/
>From 621aeff62e7cc21942343991fd9d2b43f07be50c Mon Sep 17 00:00:00 2001
From: Ross Burton <ross.burton at arm.com>
Date: Wed, 15 Oct 2025 15:04:40 +0100
Subject: [PATCH] [clang-tools-extra] Unify python shebangs
As per PEP-0394[1], there is no real concensus over what binary names
Python has, specifically 'python' could be Python 3, Python 2, or not
exist.
However, everyone has a python3 interpreter and the scripts are all
written for Python 3. Unify the shebangs so that the ~50% of shebangs
that use python now use python3.
[1] https://peps.python.org/pep-0394/
---
.../find-all-symbols/tool/run-find-all-symbols.py | 2 +-
clang-tools-extra/clangd/test/remote-index/pipeline_helper.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/clang-tools-extra/clang-include-fixer/find-all-symbols/tool/run-find-all-symbols.py b/clang-tools-extra/clang-include-fixer/find-all-symbols/tool/run-find-all-symbols.py
index 49a1b14932644..6158876d15f76 100755
--- a/clang-tools-extra/clang-include-fixer/find-all-symbols/tool/run-find-all-symbols.py
+++ b/clang-tools-extra/clang-include-fixer/find-all-symbols/tool/run-find-all-symbols.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
#
# =- run-find-all-symbols.py - Parallel find-all-symbols runner -*- python -*-=#
#
diff --git a/clang-tools-extra/clangd/test/remote-index/pipeline_helper.py b/clang-tools-extra/clangd/test/remote-index/pipeline_helper.py
index afdac985221a7..c9432341d304a 100644
--- a/clang-tools-extra/clangd/test/remote-index/pipeline_helper.py
+++ b/clang-tools-extra/clangd/test/remote-index/pipeline_helper.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
#
# ===- pipeline_helper.py - Remote Index pipeline Helper *- python -------*--===#
#
More information about the cfe-commits
mailing list