From: tip-bot for Eduardo Habkost <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: ehabkost@redhat.com, mingo@kernel.org,
linux-kernel@vger.kernel.org, wangnan0@huawei.com,
namhyung@kernel.org, hpa@zytor.com, acme@redhat.com,
jolsa@kernel.org, tglx@linutronix.de, dsahern@gmail.com,
adrian.hunter@intel.com
Subject: [tip:perf/core] perf python: Make clang_has_option() work on Python 3
Date: Mon, 8 Oct 2018 22:32:05 -0700 [thread overview]
Message-ID: <tip-e13a5d69c31d35538e80176d54d95b6addf4dcbf@git.kernel.org> (raw)
In-Reply-To: <20181005204058.7966-2-ehabkost@redhat.com>
Commit-ID: e13a5d69c31d35538e80176d54d95b6addf4dcbf
Gitweb: https://git.kernel.org/tip/e13a5d69c31d35538e80176d54d95b6addf4dcbf
Author: Eduardo Habkost <ehabkost@redhat.com>
AuthorDate: Fri, 5 Oct 2018 17:40:57 -0300
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Mon, 8 Oct 2018 14:30:44 -0300
perf python: Make clang_has_option() work on Python 3
Use a bytes literal so it works with Python 3's version of Popen().
Note that the b"..." syntax requires Python 2.6+.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/r/20181005204058.7966-2-ehabkost@redhat.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/util/setup.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/util/setup.py b/tools/perf/util/setup.py
index 1942f6dd24f6..261a55e7e1b2 100644
--- a/tools/perf/util/setup.py
+++ b/tools/perf/util/setup.py
@@ -5,7 +5,7 @@ from subprocess import Popen, PIPE
from re import sub
def clang_has_option(option):
- return [o for o in Popen(['clang', option], stderr=PIPE).stderr.readlines() if "unknown argument" in o] == [ ]
+ return [o for o in Popen(['clang', option], stderr=PIPE).stderr.readlines() if b"unknown argument" in o] == [ ]
cc = getenv("CC")
if cc == "clang":
next prev parent reply other threads:[~2018-10-09 5:32 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-05 20:40 [PATCH 0/2] tools/perf: Python 3 + clang build fixes Eduardo Habkost
2018-10-05 20:40 ` [PATCH 1/2] perf: Make clang_has_option() work on Python 3 Eduardo Habkost
2018-10-09 5:32 ` tip-bot for Eduardo Habkost [this message]
2018-10-05 20:40 ` [PATCH 2/2] perf: More portable way to make CFLAGS work with clang Eduardo Habkost
2018-10-09 5:32 ` [tip:perf/core] perf python: " tip-bot for Eduardo Habkost
2018-10-05 21:23 ` [PATCH 0/2] tools/perf: Python 3 + clang build fixes Arnaldo Carvalho de Melo
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=tip-e13a5d69c31d35538e80176d54d95b6addf4dcbf@git.kernel.org \
--to=tipbot@zytor.com \
--cc=acme@redhat.com \
--cc=adrian.hunter@intel.com \
--cc=dsahern@gmail.com \
--cc=ehabkost@redhat.com \
--cc=hpa@zytor.com \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung@kernel.org \
--cc=tglx@linutronix.de \
--cc=wangnan0@huawei.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