Gentoo Archives: gentoo-python

From: "Michał Górny" <mgorny@g.o>
To: gentoo-python@l.g.o
Cc: "Michał Górny" <mgorny@g.o>
Subject: [gentoo-python] [PATCH 2/6] [python-any-r1] do not use has_version() for interpreter checks.
Date: Mon, 22 Jul 2013 09:51:20
Message-Id: 1374486679-15887-2-git-send-email-mgorny@gentoo.org
In Reply to: [gentoo-python] [PATCH] Eclass support for pypy-bin by "Michał Górny"
1 has_version() can't handle any-of deps, and I see no point in
2 introducing special magic to handle pypy-bin there. Instead, just check
3 if the interpreter executable is installed. It is simpler and faster
4 this way.
5 ---
6 gx86/eclass/python-any-r1.eclass | 7 ++++---
7 1 file changed, 4 insertions(+), 3 deletions(-)
8
9 diff --git a/gx86/eclass/python-any-r1.eclass b/gx86/eclass/python-any-r1.eclass
10 index aa11cf7..b392453 100644
11 --- a/gx86/eclass/python-any-r1.eclass
12 +++ b/gx86/eclass/python-any-r1.eclass
13 @@ -176,9 +176,10 @@ _python_EPYTHON_supported() {
14 esac
15
16 if has "${i}" "${PYTHON_COMPAT[@]}"; then
17 - local PYTHON_PKG_DEP
18 - python_export "${i}" PYTHON_PKG_DEP
19 - if ROOT=/ has_version "${PYTHON_PKG_DEP}"; then
20 + local PYTHON
21 + python_export PYTHON
22 +
23 + if [[ -x ${PYTHON} ]]; then
24 if declare -f python_check_deps >/dev/null; then
25 local PYTHON_USEDEP="python_targets_${i}(-),python_single_target_${i}(+)"
26 python_check_deps
27 --
28 1.8.3.2

Replies