[clang] [scan-build] Use python3 instead of python in scripts. (PR #80977)

via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 7 03:28:00 PST 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-clang

Author: Collin Funk (collinfunk)

<details>
<summary>Changes</summary>

This was done in some other python files in the following commit:
4c1e487c413810655757ea19d0cf3d4f5c40898e

Without this change these scripts do not run on Debian or Ubuntu systems. See the referenced patch for more information.

---
Full diff: https://github.com/llvm/llvm-project/pull/80977.diff


4 Files Affected:

- (modified) clang/tools/include-mapping/test.py (+1-1) 
- (modified) clang/tools/scan-view/bin/scan-view (+1-1) 
- (modified) clang/tools/scan-view/share/Reporter.py (+1-1) 
- (modified) clang/tools/scan-view/share/startfile.py (+1-1) 


``````````diff
diff --git a/clang/tools/include-mapping/test.py b/clang/tools/include-mapping/test.py
index eef328381f2bb..c0f1f3a79f922 100755
--- a/clang/tools/include-mapping/test.py
+++ b/clang/tools/include-mapping/test.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 # ===- test.py -  ---------------------------------------------*- python -*--===#
 #
 # Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
diff --git a/clang/tools/scan-view/bin/scan-view b/clang/tools/scan-view/bin/scan-view
index d01aebb4029a7..f3375804654d2 100755
--- a/clang/tools/scan-view/bin/scan-view
+++ b/clang/tools/scan-view/bin/scan-view
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 from __future__ import print_function
 
diff --git a/clang/tools/scan-view/share/Reporter.py b/clang/tools/scan-view/share/Reporter.py
old mode 100644
new mode 100755
index 21874b378687e..aa16a47524c8b
--- a/clang/tools/scan-view/share/Reporter.py
+++ b/clang/tools/scan-view/share/Reporter.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 # -*- coding: utf-8 -*-
 
 """Methods for reporting bugs."""
diff --git a/clang/tools/scan-view/share/startfile.py b/clang/tools/scan-view/share/startfile.py
old mode 100644
new mode 100755
index d63e69280e90d..05e88ce642171
--- a/clang/tools/scan-view/share/startfile.py
+++ b/clang/tools/scan-view/share/startfile.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 # -*- coding: utf-8 -*-
 
 """Utility for opening a file using the default application in a cross-platform

``````````

</details>


https://github.com/llvm/llvm-project/pull/80977


More information about the cfe-commits mailing list