Gentoo Archives: gentoo-python

From: "Michał Górny" <mgorny@g.o>
To: "Michał Górny" <mgorny@g.o>
Cc: gentoo-python@l.g.o
Subject: Re: [gentoo-python] [PATCH 2/6] [python-any-r1] do not use has_version() for interpreter checks.
Date: Sat, 27 Jul 2013 09:45:41
Message-Id: 20130727114548.459fcc67@gentoo.org
In Reply to: [gentoo-python] [PATCH 2/6] [python-any-r1] do not use has_version() for interpreter checks. by "Michał Górny"
1 Dnia 2013-07-22, o godz. 11:51:15
2 Michał Górny <mgorny@g.o> napisał(a):
3
4 > has_version() can't handle any-of deps, and I see no point in
5 > introducing special magic to handle pypy-bin there. Instead, just check
6 > if the interpreter executable is installed. It is simpler and faster
7 > this way.
8 > ---
9 > gx86/eclass/python-any-r1.eclass | 7 ++++---
10 > 1 file changed, 4 insertions(+), 3 deletions(-)
11 >
12 > diff --git a/gx86/eclass/python-any-r1.eclass b/gx86/eclass/python-any-r1.eclass
13 > index aa11cf7..b392453 100644
14 > --- a/gx86/eclass/python-any-r1.eclass
15 > +++ b/gx86/eclass/python-any-r1.eclass
16 > @@ -176,9 +176,10 @@ _python_EPYTHON_supported() {
17 > esac
18 >
19 > if has "${i}" "${PYTHON_COMPAT[@]}"; then
20 > - local PYTHON_PKG_DEP
21 > - python_export "${i}" PYTHON_PKG_DEP
22 > - if ROOT=/ has_version "${PYTHON_PKG_DEP}"; then
23 > + local PYTHON
24 > + python_export PYTHON
25 > +
26 > + if [[ -x ${PYTHON} ]]; then
27 > if declare -f python_check_deps >/dev/null; then
28 > local PYTHON_USEDEP="python_targets_${i}(-),python_single_target_${i}(+)"
29 > python_check_deps
30
31 marienz noticed that the previous version enforced PYTHON_REQ_USE
32 and the new one doesn't. Let's discard this patch then and look for
33 a better solution.
34
35 --
36 Best regards,
37 Michał Górny

Attachments

File name MIME type
signature.asc application/pgp-signature