arsenm created this revision.
arsenm added reviewers: djasper, compnerd.
Herald added a subscriber: wdng.
On Ubuntu 20.04, /usr/bin/env python always fails and requires
explicitly choosing python2 or python3.
Grep shows there are a lot of other places still relying on the old,
sensible behavior but these are the annoying ones I keep running into.
https://reviews.llvm.org/D82767
Files:
clang/tools/clang-format/clang-format-diff.py
clang/tools/clang-format/git-clang-format
Index: clang/tools/clang-format/git-clang-format
===================================================================
--- clang/tools/clang-format/git-clang-format
+++ clang/tools/clang-format/git-clang-format
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
#
#===- git-clang-format - ClangFormat Git Integration ---------*- python
-*--===#
#
@@ -19,7 +19,7 @@
For further details, run:
git clang-format -h
-Requires Python 2.7 or Python 3
+Requires Python 3
"""
from __future__ import absolute_import, division, print_function
Index: clang/tools/clang-format/clang-format-diff.py
===================================================================
--- clang/tools/clang-format/clang-format-diff.py
+++ 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
-*--===#
#
Index: clang/tools/clang-format/git-clang-format
===================================================================
--- clang/tools/clang-format/git-clang-format
+++ clang/tools/clang-format/git-clang-format
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
#
#===- git-clang-format - ClangFormat Git Integration ---------*- python -*--===#
#
@@ -19,7 +19,7 @@
For further details, run:
git clang-format -h
-Requires Python 2.7 or Python 3
+Requires Python 3
"""
from __future__ import absolute_import, division, print_function
Index: clang/tools/clang-format/clang-format-diff.py
===================================================================
--- clang/tools/clang-format/clang-format-diff.py
+++ 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 -*--===#
#
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits