Gentoo Archives: gentoo-python

From: "Michał Górny" <mgorny@g.o>
To: gentoo-python@l.g.o
Cc: python@g.o, "Michał Górny" <mgorny@g.o>
Subject: [gentoo-python] [PATCH 1/4] Make Python checks consistent.
Date: Mon, 22 Apr 2013 10:51:44
Message-Id: 1366627978-8571-1-git-send-email-mgorny@gentoo.org
In Reply to: [gentoo-python] python-any-r1: bunch of bugfixes/improvements and dep-checking function by "Michał Górny"
1 Always use _python_EPYTHON_supported(), and always check for the package
2 being installed.
3 ---
4 gx86/eclass/python-any-r1.eclass | 11 +++++++----
5 1 file changed, 7 insertions(+), 4 deletions(-)
6
7 diff --git a/gx86/eclass/python-any-r1.eclass b/gx86/eclass/python-any-r1.eclass
8 index dc3443b..3799491 100644
9 --- a/gx86/eclass/python-any-r1.eclass
10 +++ b/gx86/eclass/python-any-r1.eclass
11 @@ -158,7 +158,11 @@ _python_EPYTHON_supported() {
12 esac
13
14 if has "${i}" "${PYTHON_COMPAT[@]}"; then
15 - return 0
16 + local PYTHON_PKG_DEP
17 + python_export "${i}" PYTHON_PKG_DEP
18 + if ROOT=/ has_version "${PYTHON_PKG_DEP}"; then
19 + return 0
20 + fi
21 elif ! has "${i}" "${_PYTHON_ALL_IMPLS[@]}"; then
22 ewarn "Invalid EPYTHON: ${EPYTHON}"
23 fi
24 @@ -202,10 +206,9 @@ python-any-r1_pkg_setup() {
25 fi
26 done
27
28 - local PYTHON_PKG_DEP
29 for i in "${rev_impls[@]}"; do
30 - python_export "${i}" PYTHON_PKG_DEP EPYTHON PYTHON
31 - if ROOT=/ has_version "${PYTHON_PKG_DEP}"; then
32 + python_export "${i}" EPYTHON PYTHON
33 + if _python_EPYTHON_supported "${EPYTHON}"; then
34 python_wrapper_setup "${T}"
35 return
36 fi
37 --
38 1.8.1.5