[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1406617040-26909-2-git-send-email-namhyung@kernel.org>
Date: Tue, 29 Jul 2014 15:57:20 +0900
From: Namhyung Kim <namhyung@...nel.org>
To: Arnaldo Carvalho de Melo <acme@...nel.org>
Cc: Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Ingo Molnar <mingo@...nel.org>,
Paul Mackerras <paulus@...ba.org>,
Namhyung Kim <namhyung.kim@....com>,
Namhyung Kim <namhyung@...nel.org>,
LKML <linux-kernel@...r.kernel.org>,
Jiri Olsa <jolsa@...hat.com>,
Thomas Ilsche <thomas.ilsche@...dresden.de>
Subject: [PATCH v2 2/2] perf tools: Default to python version 2
According to PEP 394 recommendation [1], it's more portable to use
python2 rather than plain python to refer python binary version 2.
Since there're distros using python3 by default like Arch, and we
don't support python3 (yet), it'd be better using python2 explicitly.
But older versions (prior to 2.7) seem not to provide python2 but just
python. Given that it's only old version, try python2 first and then
fallback to python. It'll ensure that it always points to python 2.x.
[1] https://www.python.org/dev/peps/pep-0394
Suggested-by: Thomas Ilsche <thomas.ilsche@...dresden.de>
Tested-by: Thomas Ilsche <thomas.ilsche@...dresden.de>
Signed-off-by: Namhyung Kim <namhyung@...nel.org>
---
tools/perf/config/Makefile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile
index e05d8f99424d..60177278a357 100644
--- a/tools/perf/config/Makefile
+++ b/tools/perf/config/Makefile
@@ -121,8 +121,8 @@ ifdef PARSER_DEBUG
endif
ifndef NO_LIBPYTHON
- override PYTHON := \
- $(call get-executable-or-default,PYTHON,python)
+ PYTHON2 := $(if $(call get-executable,python2),python2,python)
+ override PYTHON := $(call get-executable-or-default,PYTHON,$(PYTHON2))
override PYTHON_CONFIG := \
$(call get-executable-or-default,PYTHON_CONFIG,$(PYTHON)-config)
--
2.0.0
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists