From: Tony Jones <tonyj@suse.de>
To: linux-kernel@vger.kernel.org
Cc: Seeteena Thoufeek <s1seetee@linux.vnet.ibm.com>,
Ravi Bangoria <ravi.bangoria@linux.ibm.com>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Jiri Olsa <jolsa@kernel.org>, Jonathan Corbet <corbet@lwn.net>,
linux-perf-users@vger.kernel.org, Tony Jones <tonyj@suse.de>,
Frederic Weisbecker <fweisbec@gmail.com>,
Adrian Hunter <adrian.hunter@intel.com>
Subject: [PATCH 5/6] perf script python: remove explicit shebang from Python scripts
Date: Wed, 23 Jan 2019 16:52:28 -0800 [thread overview]
Message-ID: <20190124005229.16146-6-tonyj@suse.de> (raw)
In-Reply-To: <20190124005229.16146-1-tonyj@suse.de>
The scripts in scripts/python are intended to be run from 'perf script' and
the Python version used is dictated by how perf was built (PYTHON=).
Also most distros follow pep-0394 which recommends that /usr/bin/python
refer to Python2 and so may not exist on the system (if PYTHON=python3).
- Remove the explicit shebang
- Install the scripts as mode 644
Signed-off-by: Tony Jones <tonyj@suse.de>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
---
tools/perf/Makefile.perf | 4 ++--
tools/perf/scripts/python/exported-sql-viewer.py | 1 -
tools/perf/scripts/python/sched-migration.py | 2 --
tools/perf/scripts/python/stat-cpi.py | 1 -
4 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
index 0ee6795d82cc..09df1c8a4ec9 100644
--- a/tools/perf/Makefile.perf
+++ b/tools/perf/Makefile.perf
@@ -863,8 +863,8 @@ ifndef NO_LIBPYTHON
$(call QUIET_INSTALL, python-scripts) \
$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/python/Perf-Trace-Util/lib/Perf/Trace'; \
$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/python/bin'; \
- $(INSTALL) scripts/python/Perf-Trace-Util/lib/Perf/Trace/* -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/python/Perf-Trace-Util/lib/Perf/Trace'; \
- $(INSTALL) scripts/python/*.py -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/python'; \
+ $(INSTALL) scripts/python/Perf-Trace-Util/lib/Perf/Trace/* -m 644 -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/python/Perf-Trace-Util/lib/Perf/Trace'; \
+ $(INSTALL) scripts/python/*.py -m 644 -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/python'; \
$(INSTALL) scripts/python/bin/* -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/python/bin'
endif
$(call QUIET_INSTALL, perf_completion-script) \
diff --git a/tools/perf/scripts/python/exported-sql-viewer.py b/tools/perf/scripts/python/exported-sql-viewer.py
index f278ce5ebab7..c3091401df91 100755
--- a/tools/perf/scripts/python/exported-sql-viewer.py
+++ b/tools/perf/scripts/python/exported-sql-viewer.py
@@ -1,4 +1,3 @@
-#!/usr/bin/python2
# SPDX-License-Identifier: GPL-2.0
# exported-sql-viewer.py: view data from sql database
# Copyright (c) 2014-2018, Intel Corporation.
diff --git a/tools/perf/scripts/python/sched-migration.py b/tools/perf/scripts/python/sched-migration.py
index 3473e7f66081..3984bf51f3c5 100644
--- a/tools/perf/scripts/python/sched-migration.py
+++ b/tools/perf/scripts/python/sched-migration.py
@@ -1,5 +1,3 @@
-#!/usr/bin/python
-#
# Cpu task migration overview toy
#
# Copyright (C) 2010 Frederic Weisbecker <fweisbec@gmail.com>
diff --git a/tools/perf/scripts/python/stat-cpi.py b/tools/perf/scripts/python/stat-cpi.py
index 8410672efb8b..a81ad8835a74 100644
--- a/tools/perf/scripts/python/stat-cpi.py
+++ b/tools/perf/scripts/python/stat-cpi.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
# SPDX-License-Identifier: GPL-2.0
data = {}
--
2.20.1
next prev parent reply other threads:[~2019-01-24 0:52 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-24 0:52 [PATCH 0/6] Fix issues with Python3 scripting Tony Jones
2019-01-24 0:52 ` [PATCH 1/6] perf script python: Add trace_context extension module to sys,modules Tony Jones
2019-01-26 10:06 ` [tip:perf/core] perf script python: Add trace_context extension module to sys.modules tip-bot for Tony Jones
2019-01-24 0:52 ` [PATCH 2/6] perf script python: Use PyBytes for attr in trace-event-python Tony Jones
2019-01-26 10:07 ` [tip:perf/core] " tip-bot for Tony Jones
2019-01-24 0:52 ` [PATCH 3/6] perf script python: remove explicit shebang from setup.py Tony Jones
2019-01-26 10:07 ` [tip:perf/core] perf script python: Remove " tip-bot for Tony Jones
2019-01-24 0:52 ` [PATCH 4/6] perf script python: remove explicit shebang from tests/attr.c Tony Jones
2019-01-26 10:08 ` [tip:perf/core] perf script python: Remove " tip-bot for Tony Jones
2019-01-24 0:52 ` Tony Jones [this message]
2019-01-26 10:09 ` [tip:perf/core] perf script python: Remove explicit shebang from Python scripts tip-bot for Tony Jones
2019-01-24 0:52 ` [PATCH 6/6] perf script python: add Python3 support to tests/attr.py Tony Jones
2019-01-26 10:09 ` [tip:perf/core] perf script python: Add " tip-bot for Tony Jones
2019-02-09 12:24 ` [tip:perf/urgent] " tip-bot for Tony Jones
2019-01-24 10:39 ` [PATCH 0/6] Fix issues with Python3 scripting Jiri Olsa
2019-01-24 13:26 ` Arnaldo Carvalho de Melo
2019-01-25 12:31 ` Arnaldo Carvalho de Melo
2019-01-25 13:57 ` Arnaldo Carvalho de Melo
2019-01-25 18:09 ` Tony Jones
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190124005229.16146-6-tonyj@suse.de \
--to=tonyj@suse.de \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=corbet@lwn.net \
--cc=fweisbec@gmail.com \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=ravi.bangoria@linux.ibm.com \
--cc=s1seetee@linux.vnet.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®