From 87b9f0b87b748fb8db87e2ff81d74bb76ec4769b Mon Sep 17 00:00:00 2001 From: Jason Lowe-Power Date: Fri, 10 Feb 2017 10:00:18 -0500 Subject: misc: Update #!env calls for python to explicit version In some newer Linux distributions, env python default to Python 3.0. This patch explicitly uses "python2" instead of just "python" for all scripts that use #! Reported-by: Sanchayan Maity Signed-off-by: Jason Lowe-Power --- ext/mcpat/regression/regression.py | 2 +- ext/mcpat/regression/verify_output.py | 2 +- ext/ply/example/classcalc/calc.py | 2 +- ext/ply/example/newclasscalc/calc.py | 2 +- src/unittest/genini.py | 2 +- tests/testing/__init__.py | 2 +- tests/testing/helpers.py | 2 +- tests/testing/results.py | 2 +- tests/testing/tests.py | 2 +- tests/testing/units.py | 2 +- tests/tests.py | 2 +- util/batch/job.py | 2 +- util/batch/send.py | 2 +- util/checkpoint-tester.py | 2 +- util/compile | 2 +- util/cpt_upgrader.py | 2 +- util/decode_inst_dep_trace.py | 2 +- util/decode_inst_trace.py | 2 +- util/decode_packet_trace.py | 2 +- util/dram_lat_mem_rd_plot.py | 2 +- util/dram_sweep_plot.py | 2 +- util/encode_inst_dep_trace.py | 2 +- util/encode_packet_trace.py | 2 +- util/find_copyrights.py | 2 +- util/git-pre-commit.py | 2 +- util/hgstyle.py | 2 +- util/maint/git-patch-to-hg-patch | 2 +- util/memtest-soak.py | 2 +- util/minorview.py | 2 +- util/o3-pipeview.py | 2 +- util/oprofile-top.py | 2 +- util/pbs/job.py | 2 +- util/pbs/send.py | 2 +- util/protolib.py | 2 +- util/qdo | 2 +- util/regress | 2 +- util/slicc | 2 +- util/stats/stats.py | 2 +- util/streamline/m5stats2streamline.py | 2 +- util/style.py | 2 +- util/style/__init__.py | 2 +- util/style/repo.py | 2 +- util/style/sort_includes.py | 2 +- util/style/style.py | 2 +- util/style/verifiers.py | 2 +- 45 files changed, 45 insertions(+), 45 deletions(-) diff --git a/ext/mcpat/regression/regression.py b/ext/mcpat/regression/regression.py index aabfec75d..0115a5625 100755 --- a/ext/mcpat/regression/regression.py +++ b/ext/mcpat/regression/regression.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # Copyright (c) 2010-2013 Advanced Micro Devices, Inc. # All rights reserved. diff --git a/ext/mcpat/regression/verify_output.py b/ext/mcpat/regression/verify_output.py index c37663c8f..aaa75929f 100644 --- a/ext/mcpat/regression/verify_output.py +++ b/ext/mcpat/regression/verify_output.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # Copyright (c) 2010-2013 Advanced Micro Devices, Inc. # All rights reserved. diff --git a/ext/ply/example/classcalc/calc.py b/ext/ply/example/classcalc/calc.py index bf0d065e4..f3591977b 100755 --- a/ext/ply/example/classcalc/calc.py +++ b/ext/ply/example/classcalc/calc.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # ----------------------------------------------------------------------------- # calc.py diff --git a/ext/ply/example/newclasscalc/calc.py b/ext/ply/example/newclasscalc/calc.py index a12e498b2..3461f243e 100755 --- a/ext/ply/example/newclasscalc/calc.py +++ b/ext/ply/example/newclasscalc/calc.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # ----------------------------------------------------------------------------- # calc.py diff --git a/src/unittest/genini.py b/src/unittest/genini.py index a969a6ee4..19e6442de 100755 --- a/src/unittest/genini.py +++ b/src/unittest/genini.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # Copyright (c) 2005 The Regents of The University of Michigan # All rights reserved. # diff --git a/tests/testing/__init__.py b/tests/testing/__init__.py index e7c83da10..1bc471108 100644 --- a/tests/testing/__init__.py +++ b/tests/testing/__init__.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # # Copyright (c) 2016 ARM Limited # All rights reserved diff --git a/tests/testing/helpers.py b/tests/testing/helpers.py index 757167a4b..e2f3fbe7d 100755 --- a/tests/testing/helpers.py +++ b/tests/testing/helpers.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # # Copyright (c) 2016 ARM Limited # All rights reserved diff --git a/tests/testing/results.py b/tests/testing/results.py index 1df14bc4f..387362a75 100644 --- a/tests/testing/results.py +++ b/tests/testing/results.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # # Copyright (c) 2016 ARM Limited # All rights reserved diff --git a/tests/testing/tests.py b/tests/testing/tests.py index 6f887ff80..c9a2a06b2 100644 --- a/tests/testing/tests.py +++ b/tests/testing/tests.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # # Copyright (c) 2016 ARM Limited # All rights reserved diff --git a/tests/testing/units.py b/tests/testing/units.py index 6214c8f14..808763fcc 100644 --- a/tests/testing/units.py +++ b/tests/testing/units.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # # Copyright (c) 2016 ARM Limited # All rights reserved diff --git a/tests/tests.py b/tests/tests.py index 85b194c56..136c879aa 100755 --- a/tests/tests.py +++ b/tests/tests.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # # Copyright (c) 2016 ARM Limited # All rights reserved diff --git a/util/batch/job.py b/util/batch/job.py index 9d7ecca8c..471b88251 100755 --- a/util/batch/job.py +++ b/util/batch/job.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # Copyright (c) 2006 The Regents of The University of Michigan # All rights reserved. # diff --git a/util/batch/send.py b/util/batch/send.py index e7bf1958f..44a4f2879 100755 --- a/util/batch/send.py +++ b/util/batch/send.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # Copyright (c) 2006 The Regents of The University of Michigan # All rights reserved. # diff --git a/util/checkpoint-tester.py b/util/checkpoint-tester.py index 530462758..bec4709fc 100755 --- a/util/checkpoint-tester.py +++ b/util/checkpoint-tester.py @@ -1,4 +1,4 @@ -#! /usr/bin/env python +#! /usr/bin/env python2 # Copyright (c) 2010 Advanced Micro Devices, Inc. # All rights reserved. diff --git a/util/compile b/util/compile index 627e78b74..f3040f794 100755 --- a/util/compile +++ b/util/compile @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # Copyright (c) 2006 The Regents of The University of Michigan # All rights reserved. # diff --git a/util/cpt_upgrader.py b/util/cpt_upgrader.py index ffd5d701b..5102fd5a2 100755 --- a/util/cpt_upgrader.py +++ b/util/cpt_upgrader.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # Copyright (c) 2012-2013,2015 ARM Limited # All rights reserved diff --git a/util/decode_inst_dep_trace.py b/util/decode_inst_dep_trace.py index 6e4030146..956a16133 100755 --- a/util/decode_inst_dep_trace.py +++ b/util/decode_inst_dep_trace.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # Copyright (c) 2013 - 2015 ARM Limited # All rights reserved diff --git a/util/decode_inst_trace.py b/util/decode_inst_trace.py index 6915e714a..ff5c73386 100755 --- a/util/decode_inst_trace.py +++ b/util/decode_inst_trace.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # Copyright (c) 2013-2014 ARM Limited # All rights reserved diff --git a/util/decode_packet_trace.py b/util/decode_packet_trace.py index 97d344163..34a0d8bbc 100755 --- a/util/decode_packet_trace.py +++ b/util/decode_packet_trace.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # Copyright (c) 2013-2014 ARM Limited # All rights reserved diff --git a/util/dram_lat_mem_rd_plot.py b/util/dram_lat_mem_rd_plot.py index 72e1528c3..422b14049 100755 --- a/util/dram_lat_mem_rd_plot.py +++ b/util/dram_lat_mem_rd_plot.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # Copyright (c) 2015 ARM Limited # All rights reserved diff --git a/util/dram_sweep_plot.py b/util/dram_sweep_plot.py index f3fc32960..5eb18b95a 100755 --- a/util/dram_sweep_plot.py +++ b/util/dram_sweep_plot.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # Copyright (c) 2014 ARM Limited # All rights reserved diff --git a/util/encode_inst_dep_trace.py b/util/encode_inst_dep_trace.py index e54e82d70..d8d5ba143 100755 --- a/util/encode_inst_dep_trace.py +++ b/util/encode_inst_dep_trace.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # Copyright (c) 2015 ARM Limited # All rights reserved diff --git a/util/encode_packet_trace.py b/util/encode_packet_trace.py index 0734d43c8..c4d461664 100755 --- a/util/encode_packet_trace.py +++ b/util/encode_packet_trace.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # Copyright (c) 2013-2014 ARM Limited # All rights reserved diff --git a/util/find_copyrights.py b/util/find_copyrights.py index 697f4b728..8a12bc3b1 100644 --- a/util/find_copyrights.py +++ b/util/find_copyrights.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 import os import re diff --git a/util/git-pre-commit.py b/util/git-pre-commit.py index 276e21fc5..1b93069da 100755 --- a/util/git-pre-commit.py +++ b/util/git-pre-commit.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # # Copyright (c) 2016 ARM Limited # All rights reserved diff --git a/util/hgstyle.py b/util/hgstyle.py index ecdec4b0f..da0cdeb90 100755 --- a/util/hgstyle.py +++ b/util/hgstyle.py @@ -1,4 +1,4 @@ -#! /usr/bin/env python +#! /usr/bin/env python2 # Copyright (c) 2014 ARM Limited # All rights reserved # diff --git a/util/maint/git-patch-to-hg-patch b/util/maint/git-patch-to-hg-patch index 6819cfcce..1b9e05d09 100755 --- a/util/maint/git-patch-to-hg-patch +++ b/util/maint/git-patch-to-hg-patch @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # # This file originated from the moz-git-tools repo on GitHub # (https://github.com/mozilla/moz-git-tools), which contains the diff --git a/util/memtest-soak.py b/util/memtest-soak.py index 2ece09c21..b61d1c5b7 100755 --- a/util/memtest-soak.py +++ b/util/memtest-soak.py @@ -1,4 +1,4 @@ -#! /usr/bin/env python +#! /usr/bin/env python2 # Copyright (c) 2015 ARM Limited # All rights reserved diff --git a/util/minorview.py b/util/minorview.py index 1a6b47b01..39c633179 100755 --- a/util/minorview.py +++ b/util/minorview.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # # Copyright (c) 2013 ARM Limited # All rights reserved diff --git a/util/o3-pipeview.py b/util/o3-pipeview.py index 4d3a59a29..08fd8d334 100755 --- a/util/o3-pipeview.py +++ b/util/o3-pipeview.py @@ -1,4 +1,4 @@ -#! /usr/bin/env python +#! /usr/bin/env python2 # Copyright (c) 2011 ARM Limited # All rights reserved diff --git a/util/oprofile-top.py b/util/oprofile-top.py index aea9dfadd..f64440646 100755 --- a/util/oprofile-top.py +++ b/util/oprofile-top.py @@ -1,4 +1,4 @@ -#! /usr/bin/env python +#! /usr/bin/env python2 # Copyright (c) 2005 The Regents of The University of Michigan # All rights reserved. diff --git a/util/pbs/job.py b/util/pbs/job.py index 0fd3b4f97..4c400310c 100755 --- a/util/pbs/job.py +++ b/util/pbs/job.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # Copyright (c) 2005 The Regents of The University of Michigan # All rights reserved. # diff --git a/util/pbs/send.py b/util/pbs/send.py index 54bba931d..62ab2e5b9 100755 --- a/util/pbs/send.py +++ b/util/pbs/send.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # Copyright (c) 2005 The Regents of The University of Michigan # All rights reserved. # diff --git a/util/protolib.py b/util/protolib.py index e0507cdd4..47ac8768f 100644 --- a/util/protolib.py +++ b/util/protolib.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # Copyright (c) 2013 ARM Limited # All rights reserved diff --git a/util/qdo b/util/qdo index d53f3e9b1..9ec9b8f52 100755 --- a/util/qdo +++ b/util/qdo @@ -1,4 +1,4 @@ -#! /usr/bin/env python +#! /usr/bin/env python2 # Copyright (c) 2004-2005, 2007 The Regents of The University of Michigan # All rights reserved. diff --git a/util/regress b/util/regress index 5cc576b5d..da71e6575 100755 --- a/util/regress +++ b/util/regress @@ -1,4 +1,4 @@ -#! /usr/bin/env python +#! /usr/bin/env python2 # Copyright (c) 2005-2007 The Regents of The University of Michigan # All rights reserved. # diff --git a/util/slicc b/util/slicc index 07bd73ffa..b4ccec0d8 100755 --- a/util/slicc +++ b/util/slicc @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # Copyright (c) 2009 The Hewlett-Packard Development Company # All rights reserved. # diff --git a/util/stats/stats.py b/util/stats/stats.py index ea2210685..209108c77 100755 --- a/util/stats/stats.py +++ b/util/stats/stats.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # Copyright (c) 2003-2004 The Regents of The University of Michigan # All rights reserved. diff --git a/util/streamline/m5stats2streamline.py b/util/streamline/m5stats2streamline.py index c65649e79..816d042dc 100755 --- a/util/streamline/m5stats2streamline.py +++ b/util/streamline/m5stats2streamline.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # Copyright (c) 2012, 2014 ARM Limited # All rights reserved diff --git a/util/style.py b/util/style.py index 15a99c895..1dd7af34e 100755 --- a/util/style.py +++ b/util/style.py @@ -1,4 +1,4 @@ -#! /usr/bin/env python +#! /usr/bin/env python2 # # Copyright (c) 2016 ARM Limited # All rights reserved diff --git a/util/style/__init__.py b/util/style/__init__.py index e7c83da10..1bc471108 100644 --- a/util/style/__init__.py +++ b/util/style/__init__.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # # Copyright (c) 2016 ARM Limited # All rights reserved diff --git a/util/style/repo.py b/util/style/repo.py index adcbdc95f..7e3b444c6 100644 --- a/util/style/repo.py +++ b/util/style/repo.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # # Copyright (c) 2016 ARM Limited # All rights reserved diff --git a/util/style/sort_includes.py b/util/style/sort_includes.py index a35b08468..d1a25ee6b 100644 --- a/util/style/sort_includes.py +++ b/util/style/sort_includes.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # # Copyright (c) 2014-2015 ARM Limited # All rights reserved diff --git a/util/style/style.py b/util/style/style.py index 9f3f0d0f0..317caa395 100644 --- a/util/style/style.py +++ b/util/style/style.py @@ -1,4 +1,4 @@ -#! /usr/bin/env python +#! /usr/bin/env python2 # Copyright (c) 2014, 2016 ARM Limited # All rights reserved # diff --git a/util/style/verifiers.py b/util/style/verifiers.py index 1be453601..89247dc4f 100644 --- a/util/style/verifiers.py +++ b/util/style/verifiers.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # # Copyright (c) 2014, 2016 ARM Limited # All rights reserved -- cgit v1.2.3