Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1407034imu; Wed, 23 Jan 2019 16:53:07 -0800 (PST) X-Google-Smtp-Source: ALg8bN5BM2VprrTEx7uPEe2AbhqZ3kL3RFbU4CMRutS4A6DSf3oJSJJkbxtgK3H6kfkfc5EBUYCP X-Received: by 2002:a17:902:24d:: with SMTP id 71mr4328359plc.225.1548291187930; Wed, 23 Jan 2019 16:53:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548291187; cv=none; d=google.com; s=arc-20160816; b=zz73k/YK/5Y9wPxmAw0Vx4eshn/8h9s5VZwttP2lL2F9490ltfk0xJSCEWYJXvz65B h0zf1obn8+w4rM/GAI77KrA0l3sODD8R0fwGeTWtTOusrFUsZaHhRULii5y0ad4W7q2C 54xx1jShJ7mb4hDp79yWSPUfqAgxnB0GoeQHSQ2s+N6IrW4NLqYLFaPbmqZCzIDw82cR bi28SYNOpyP6kAGb7rdwl8GajqA9Y6s/YWQUA8/he6KqQS7xT+M08agJaDrr8/eVW7Sq 2GTduw+accOB760SeA01/k8bWsitvJxkl793GIzjKbYnk6hAeVpGsuFmn4tLQdaN4r3O cO3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=Zx+8DNVsqxzAEYEi5uWkh1u/eoQDH8I1JlZfn/rp5os=; b=zVqjZb8bholpjaVwupkS8eE+1fDe/xBQPu7pkBTRC7XaNwqYJc29A4ywXMN4kr+xLc ny0ygFaaCI6nkKRYWR/ESKsXxnXWIxgIT7uvWPSpZ5NxmIV32cRR8Hwi7UtgQz6Tju56 UjHS9xiLe4ULbHH+Yfl3wS3cx5aJgQrcRGZhDpR9iIY+F71BXyKlxc484A0tPAg3rA5i 5V9Sz/Uy6J1kFeU+CNBTr0XcSy1bBZJZR4T2Xuntnev5/IfKxSxKi5uXONUBkdNZUKA8 5pJSr9lS+ueUwZGogYRdivgvYuTPYzyhvgoOaeH/YC6fAlHrPiHJQlnPQsWknlAE8Ili JX9w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c3si19827872pls.73.2019.01.23.16.52.52; Wed, 23 Jan 2019 16:53:07 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727187AbfAXAwF (ORCPT + 99 others); Wed, 23 Jan 2019 19:52:05 -0500 Received: from mx2.suse.de ([195.135.220.15]:37650 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727159AbfAXAwE (ORCPT ); Wed, 23 Jan 2019 19:52:04 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 46893AFCB; Thu, 24 Jan 2019 00:52:02 +0000 (UTC) From: Tony Jones To: linux-kernel@vger.kernel.org Cc: Seeteena Thoufeek , Ravi Bangoria , Arnaldo Carvalho de Melo , Jiri Olsa , Jonathan Corbet , linux-perf-users@vger.kernel.org, Tony Jones , Frederic Weisbecker , Adrian Hunter Subject: [PATCH 5/6] perf script python: remove explicit shebang from Python scripts Date: Wed, 23 Jan 2019 16:52:28 -0800 Message-Id: <20190124005229.16146-6-tonyj@suse.de> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190124005229.16146-1-tonyj@suse.de> References: <20190124005229.16146-1-tonyj@suse.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Cc: Frederic Weisbecker Cc: Adrian Hunter Cc: Jiri Olsa --- 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 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