From c297253b60f3a9cd8abfef84cc054967c8ff5733 Mon Sep 17 00:00:00 2001 From: "Samuel E. Browne" Date: Thu, 6 Jun 2024 15:15:44 -0600 Subject: [PATCH 1/2] Use 'python3' to access Python (#610) As per https://peps.python.org/pep-0394, it is best practice to not use 'python' in shebangs. Use the explicit `python3` entry point instead. Signed-off-by: Samuel E. Browne --- common_tools/git/cherry-pick-commits.py | 2 +- common_tools/git/commit-summary-over-periods.py | 2 +- common_tools/git/hooks/server-side/get_recipients.py | 2 +- common_tools/git/hooks/server-side/update_push_log.py | 2 +- common_tools/test/hhmmss_math.py | 2 +- common_tools/test/kill-pstree.py | 2 +- refactoring/remove_std_tribits_includes.py | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/common_tools/git/cherry-pick-commits.py b/common_tools/git/cherry-pick-commits.py index e3a3f2a6c..c45ec0bf0 100755 --- a/common_tools/git/cherry-pick-commits.py +++ b/common_tools/git/cherry-pick-commits.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # @HEADER # ************************************************************************ # diff --git a/common_tools/git/commit-summary-over-periods.py b/common_tools/git/commit-summary-over-periods.py index be5dd8aea..8d5a3fe1b 100755 --- a/common_tools/git/commit-summary-over-periods.py +++ b/common_tools/git/commit-summary-over-periods.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # @HEADER # ************************************************************************ # diff --git a/common_tools/git/hooks/server-side/get_recipients.py b/common_tools/git/hooks/server-side/get_recipients.py index 52274fea1..fbe2976ff 100755 --- a/common_tools/git/hooks/server-side/get_recipients.py +++ b/common_tools/git/hooks/server-side/get_recipients.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 import commands import os diff --git a/common_tools/git/hooks/server-side/update_push_log.py b/common_tools/git/hooks/server-side/update_push_log.py index d7fa52602..8ddfc8f9e 100755 --- a/common_tools/git/hooks/server-side/update_push_log.py +++ b/common_tools/git/hooks/server-side/update_push_log.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # @HEADER # ************************************************************************ # diff --git a/common_tools/test/hhmmss_math.py b/common_tools/test/hhmmss_math.py index 81dce2d91..a954b12cd 100644 --- a/common_tools/test/hhmmss_math.py +++ b/common_tools/test/hhmmss_math.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # This simple set of python functions makes it easy to do simple math with # times formatted as
hms. This makes it easier to analyze diff --git a/common_tools/test/kill-pstree.py b/common_tools/test/kill-pstree.py index 4fc93e9d3..3d35eedf9 100755 --- a/common_tools/test/kill-pstree.py +++ b/common_tools/test/kill-pstree.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # @HEADER # ************************************************************************ # diff --git a/refactoring/remove_std_tribits_includes.py b/refactoring/remove_std_tribits_includes.py index 29dcea3f9..5c5cba3f7 100755 --- a/refactoring/remove_std_tribits_includes.py +++ b/refactoring/remove_std_tribits_includes.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 include_files_to_remove = [ "AddSubdirectories", From 3dca096437acbb7a16b88bee7d9569bccd8e6317 Mon Sep 17 00:00:00 2001 From: "Samuel E. Browne" Date: Thu, 6 Jun 2024 15:26:15 -0600 Subject: [PATCH 2/2] Add Python3 requirement to user guide (#610) Signed-off-by: Samuel E. Browne --- tribits/doc/guides/TribitsGuidesBody.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tribits/doc/guides/TribitsGuidesBody.rst b/tribits/doc/guides/TribitsGuidesBody.rst index 18507eddb..29a319fc6 100644 --- a/tribits/doc/guides/TribitsGuidesBody.rst +++ b/tribits/doc/guides/TribitsGuidesBody.rst @@ -4233,7 +4233,8 @@ repositories if specified). There are several python tools under ``tribits/ci_support/`` that read in this file and use the created data-structure for various tasks. This file and these tools are used by `checkin-test.py`_ and `tribits_ctest_driver()`_. But these tools can also be -used to construct other workflows and tools. +used to construct other workflows and tools. These tools require a Python3 +installation and for the `python3` executable to be installed. .. _TribitsDumpDepsXmlScript.cmake: