[clang] 71e8038 - Update shebang for clang-format-diff script to python3.

Paula Toth via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 22 06:48:11 PDT 2021


Author: Paula Toth
Date: 2021-04-22T06:47:51-07:00
New Revision: 71e80386d0fe7f7a2f997271ce5d492d5e8686c2

URL: https://github.com/llvm/llvm-project/commit/71e80386d0fe7f7a2f997271ce5d492d5e8686c2
DIFF: https://github.com/llvm/llvm-project/commit/71e80386d0fe7f7a2f997271ce5d492d5e8686c2.diff

LOG: Update shebang for clang-format-diff script to python3.

Different distributions have different strategies migrating the `python` symlink. Debian and its derivatives provide `python-is-python2` and `python-is-python3`. If neither is installed, the user gets no `/usr/bin/python`. The clang-format-diff script and consequently `arc diff` can thus fail with a python not found error.  Since we require python greater than 3.6 as part of llvm prerequisites (https://llvm.org/docs/GettingStarted.html#software), let's go ahead and update this shebang.

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D100968

Added: 
    

Modified: 
    clang/tools/clang-format/clang-format-diff.py

Removed: 
    


################################################################################
diff  --git a/clang/tools/clang-format/clang-format-
diff .py b/clang/tools/clang-format/clang-format-
diff .py
index efed8168cc505..4edc0b2e19c29 100755
--- a/clang/tools/clang-format/clang-format-
diff .py
+++ b/clang/tools/clang-format/clang-format-
diff .py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 #===- clang-format-
diff .py - ClangFormat Diff Reformatter ----*- python -*--===#
 #


        


More information about the cfe-commits mailing list