Gentoo Archives: gentoo-commits

From: "Arfrever Frehtes Taifersar Arahesis (arfrever)" <arfrever@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in eclass: python.eclass
Date: Mon, 31 Aug 2009 18:49:39
Message-Id: E1MiGlY-0002Xz-KE@stork.gentoo.org
1 arfrever 09/08/31 23:58:28
2
3 Modified: python.eclass
4 Log:
5 Improve validate_PYTHON_ABIS() and python_execute_function().
6
7 Revision Changes Path
8 1.69 eclass/python.eclass
9
10 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/python.eclass?rev=1.69&view=markup
11 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/python.eclass?rev=1.69&content-type=text/plain
12 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/python.eclass?r1=1.68&r2=1.69
13
14 Index: python.eclass
15 ===================================================================
16 RCS file: /var/cvsroot/gentoo-x86/eclass/python.eclass,v
17 retrieving revision 1.68
18 retrieving revision 1.69
19 diff -u -r1.68 -r1.69
20 --- python.eclass 31 Aug 2009 00:07:37 -0000 1.68
21 +++ python.eclass 31 Aug 2009 23:58:28 -0000 1.69
22 @@ -1,6 +1,6 @@
23 # Copyright 1999-2009 Gentoo Foundation
24 # Distributed under the terms of the GNU General Public License v2
25 -# $Header: /var/cvsroot/gentoo-x86/eclass/python.eclass,v 1.68 2009/08/31 00:07:37 arfrever Exp $
26 +# $Header: /var/cvsroot/gentoo-x86/eclass/python.eclass,v 1.69 2009/08/31 23:58:28 arfrever Exp $
27
28 # @ECLASS: python.eclass
29 # @MAINTAINER:
30 @@ -131,7 +131,7 @@
31 local ABI support_ABI supported_PYTHON_ABIS= restricted_ABI
32 PYTHON_ABI_SUPPORTED_VALUES="2.4 2.5 2.6 2.7 3.0 3.1 3.2"
33
34 - if declare -p | grep "^declare -x USE_PYTHON=" > /dev/null; then
35 + if [[ "$(declare -p USE_PYTHON 2>/dev/null)" == "declare -x USE_PYTHON="* ]]; then
36 if [[ -z "${USE_PYTHON}" ]]; then
37 die "USE_PYTHON variable is empty"
38 fi
39 @@ -363,8 +363,12 @@
40 failure_message="${action} failed with Python ${PYTHON_ABI} in ${function}() function"
41 fi
42
43 - if [[ "${nonfatal}" == "1" ]] || has "${PYTHON_ABI}" ${FAILURE_TOLERANT_PYTHON_ABIS}; then
44 - local ABI enabled_PYTHON_ABIS
45 + if [[ "${nonfatal}" == "1" ]]; then
46 + if [[ "${quiet}" == "0" ]]; then
47 + ewarn "${RED}${failure_message}${NORMAL}"
48 + fi
49 + elif has "${PYTHON_ABI}" ${FAILURE_TOLERANT_PYTHON_ABIS}; then
50 + local ABI enabled_PYTHON_ABIS=
51 for ABI in ${PYTHON_ABIS}; do
52 [[ "${ABI}" != "${PYTHON_ABI}" ]] && enabled_PYTHON_ABIS+=" ${ABI}"
53 done
54 @@ -372,6 +376,9 @@
55 if [[ "${quiet}" == "0" ]]; then
56 ewarn "${RED}${failure_message}${NORMAL}"
57 fi
58 + if [[ -z "${PYTHON_ABIS}" ]]; then
59 + die "${function}() function failed with all enabled versions of Python"
60 + fi
61 else
62 die "${failure_message}"
63 fi