From: Thomas Ilsche <thomas.ilsche@tu-dresden.de>
To: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Ingo Molnar <mingo@kernel.org>, Paul Mackerras <paulus@samba.org>,
Namhyung Kim <namhyung.kim@lge.com>,
LKML <linux-kernel@vger.kernel.org>, Jiri Olsa <jolsa@redhat.com>
Subject: [PATCH v3 2/2] perf tools: Default to python version 2
Date: Mon, 04 Aug 2014 15:03:15 +0200 [thread overview]
Message-ID: <53DF8493.6070206@tu-dresden.de> (raw)
In-Reply-To: <20140802132013.GC13375@kernel.org>
On 2014-08-02 15:20, Arnaldo Carvalho de Melo wrote:
> Maybe the way python was packaged on f14 is problematic, as you
> describe, but the fact is that python support is not working on that
> platform after this patch.
>
> Could you please try to prepare a patch that does as you suggest so that
> I can try?
Please try the patch below.
I tested (compiles and perf script runs) with the combinations:
1) python -> python2.x, python-config -> python2.x-config
python2 N/A, python2-config N/A
2) python -> python3.x, python-config -> python3.x-config
python2 -> python2.x, python2-config -> python2.x-config
3) python -> python2.x, python-config -> python2.x-config
python2 -> python2.x, python2-config -> python2.x-config
4) python -> python2.x, python-config -> python2.x-config
python2 -> python2.x, python2-config N/A
Based on / replaces the patch 2/2 by Namhyung Kim.
Signed-off-by: Thomas Ilsche <thomas.ilsche@tu-dresden.de>
---
diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile
index 9ee2008..0528cd37 100644
--- a/tools/perf/config/Makefile
+++ b/tools/perf/config/Makefile
@@ -104,10 +104,16 @@ ifdef PARSER_DEBUG
endif
ifndef NO_LIBPYTHON
- override PYTHON := \
- $(call get-executable-or-default,PYTHON,python)
+ # Try different combinations to accommodate systems that only have
+ # python[2][-config] in weird combinations but always preferring
+ # python2 and python2-config as per pep-0394. If we catch a
+ # python[-config] in version 3, the version check will kill it.
+ PYTHON2 := $(if $(call get-executable,python2),python2,python)
+ override PYTHON := $(call get-executable-or-default,PYTHON,$(PYTHON2))
+ PYTHON2_CONFIG := \
+ $(if $(call get-executable,$(PYTHON)-config),$(PYTHON)-config,python-config)
override PYTHON_CONFIG := \
- $(call get-executable-or-default,PYTHON_CONFIG,$(PYTHON)-config)
+ $(call get-executable-or-default,PYTHON_CONFIG,$(PYTHON2_CONFIG))
PYTHON_CONFIG_SQ := $(call shell-sq,$(PYTHON_CONFIG))
next prev parent reply other threads:[~2014-08-04 13:03 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-29 6:57 [PATCH v2 1/2] perf tools: Fix make PYTHON override Namhyung Kim
2014-07-29 6:57 ` [PATCH v2 2/2] perf tools: Default to python version 2 Namhyung Kim
2014-08-01 20:21 ` Arnaldo Carvalho de Melo
2014-08-02 10:56 ` Thomas Ilsche
2014-08-02 13:20 ` Arnaldo Carvalho de Melo
2014-08-04 13:03 ` Thomas Ilsche [this message]
2014-08-04 15:35 ` [PATCH v3 " Arnaldo Carvalho de Melo
2014-08-13 5:19 ` [tip:perf/core] " tip-bot for Thomas Ilsche
2014-07-31 14:38 ` [PATCH v2 1/2] perf tools: Fix make PYTHON override Arnaldo Carvalho de Melo
2014-08-13 5:17 ` [tip:perf/core] " tip-bot for Namhyung Kim
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=53DF8493.6070206@tu-dresden.de \
--to=thomas.ilsche@tu-dresden.de \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@kernel.org \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung.kim@lge.com \
--cc=namhyung@kernel.org \
--cc=paulus@samba.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.