From e7c32a8bd3d81e490f8395971bde8710de1ce3b1 Mon Sep 17 00:00:00 2001 From: William Cohen Date: Mon, 7 Oct 2024 13:50:29 -0400 Subject: [PATCH] high-level: Explicitly use python3 and place shebang on the first line Python3 has been released for over 15 years. Fedora, Debian, and other distributions state that python scripts should avoid using unversioned python intepreter: https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3 https://www.debian.org/doc/packaging-manuals/python-policy/ The RPM build process will flag unversioned python interpreter use as an error and the build will fail. Making the papi_hl_output_writer.py explicitly use /usr/bin/python3. The shebang line that describes which interpreter to use must be the first line of the file (https://www.shellcheck.net/wiki/SC1128). --- src/high-level/scripts/papi_hl_output_writer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/high-level/scripts/papi_hl_output_writer.py b/src/high-level/scripts/papi_hl_output_writer.py index c23a8344b..ceec38c9c 100755 --- a/src/high-level/scripts/papi_hl_output_writer.py +++ b/src/high-level/scripts/papi_hl_output_writer.py @@ -1,10 +1,10 @@ +#!/usr/bin/env python3 ## # @file papi_hl_output_writer.py # @brief Converts HL output to be more comprehensible. # Output is enhanced by creating derived metrics like IPC, # MFlop/s, and MFlips/s. As well as real and processor time. -#!/usr/bin/python from __future__ import division from collections import OrderedDict