[PATCH] D82767: clang-format: Explicitly use python3
Matt Arsenault via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jun 29 06:59:18 PDT 2020
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 -*--===#
#
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D82767.274095.patch
Type: text/x-patch
Size: 925 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200629/9db1c22a/attachment-0001.bin>
More information about the cfe-commits
mailing list