Gentoo Archives: gentoo-commits

From: "Michal Gorny (mgorny)" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog python-r1.eclass
Date: Mon, 04 Mar 2013 19:28:02
Message-Id: 20130304192758.88C882171D@flycatcher.gentoo.org
1 mgorny 13/03/04 19:27:58
2
3 Modified: ChangeLog python-r1.eclass
4 Log:
5 Use multibuild.eclass in python-r1.
6
7 Revision Changes Path
8 1.709 eclass/ChangeLog
9
10 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.709&view=markup
11 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.709&content-type=text/plain
12 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.708&r2=1.709
13
14 Index: ChangeLog
15 ===================================================================
16 RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
17 retrieving revision 1.708
18 retrieving revision 1.709
19 diff -u -r1.708 -r1.709
20 --- ChangeLog 4 Mar 2013 19:27:24 -0000 1.708
21 +++ ChangeLog 4 Mar 2013 19:27:58 -0000 1.709
22 @@ -1,6 +1,9 @@
23 # ChangeLog for eclass directory
24 # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
25 -# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.708 2013/03/04 19:27:24 mgorny Exp $
26 +# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.709 2013/03/04 19:27:58 mgorny Exp $
27 +
28 + 04 Mar 2013; Michał Górny <mgorny@g.o> python-r1.eclass:
29 + Use multibuild.eclass in python-r1.
30
31 04 Mar 2013; Michał Górny <mgorny@g.o> multibuild.eclass:
32 Add multibuild_for_best_variant.
33
34
35
36 1.46 eclass/python-r1.eclass
37
38 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?rev=1.46&view=markup
39 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?rev=1.46&content-type=text/plain
40 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?r1=1.45&r2=1.46
41
42 Index: python-r1.eclass
43 ===================================================================
44 RCS file: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v
45 retrieving revision 1.45
46 retrieving revision 1.46
47 diff -u -r1.45 -r1.46
48 --- python-r1.eclass 4 Mar 2013 19:22:13 -0000 1.45
49 +++ python-r1.eclass 4 Mar 2013 19:27:58 -0000 1.46
50 @@ -1,6 +1,6 @@
51 # Copyright 1999-2013 Gentoo Foundation
52 # Distributed under the terms of the GNU General Public License v2
53 -# $Header: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v 1.45 2013/03/04 19:22:13 mgorny Exp $
54 +# $Header: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v 1.46 2013/03/04 19:27:58 mgorny Exp $
55
56 # @ECLASS: python-r1
57 # @MAINTAINER:
58 @@ -578,6 +578,37 @@
59 fi
60 }
61
62 +# @FUNCTION: _python_obtain_impls
63 +# @INTERNAL
64 +# @DESCRIPTION:
65 +# Set up the enabled implementation list.
66 +_python_obtain_impls() {
67 + MULTIBUILD_VARIANTS=()
68 +
69 + for impl in "${_PYTHON_ALL_IMPLS[@]}"; do
70 + if has "${impl}" "${PYTHON_COMPAT[@]}" \
71 + && use "python_targets_${impl}"
72 + then
73 + MULTIBUILD_VARIANTS+=( "${impl}" )
74 + fi
75 + done
76 +}
77 +
78 +# @FUNCTION: _python_multibuild_wrapper
79 +# @USAGE: <command> [<args>...]
80 +# @INTERNAL
81 +# @DESCRIPTION:
82 +# Initialize the environment for Python implementation selected
83 +# for multibuild.
84 +_python_multibuild_wrapper() {
85 + debug-print-function ${FUNCNAME} "${@}"
86 +
87 + local -x EPYTHON PYTHON
88 + python_export "${MULTIBUILD_VARIANT}" EPYTHON PYTHON
89 +
90 + "${@}"
91 +}
92 +
93 # @FUNCTION: python_foreach_impl
94 # @USAGE: <command> [<args>...]
95 # @DESCRIPTION:
96 @@ -597,30 +628,10 @@
97 _python_validate_useflags
98 _python_check_USE_PYTHON
99
100 - local impl
101 - local bdir=${BUILD_DIR:-${S}}
102 - local ret=0 lret=0
103 -
104 - debug-print "${FUNCNAME}: bdir = ${bdir}"
105 - for impl in "${_PYTHON_ALL_IMPLS[@]}"; do
106 - if has "${impl}" "${PYTHON_COMPAT[@]}" \
107 - && _python_impl_supported "${impl}" \
108 - && use "python_targets_${impl}"
109 - then
110 - local EPYTHON PYTHON
111 - python_export "${impl}" EPYTHON PYTHON
112 - local BUILD_DIR=${bdir%%/}-${impl}
113 - export EPYTHON PYTHON
114 -
115 - einfo "${EPYTHON}: running ${@}"
116 - "${@}"
117 - lret=${?}
118 -
119 - [[ ${ret} -eq 0 && ${lret} -ne 0 ]] && ret=${lret}
120 - fi
121 - done
122 + local MULTIBUILD_VARIANTS
123 + _python_obtain_impls
124
125 - return ${ret}
126 + multibuild_foreach_variant _python_multibuild_wrapper "${@}"
127 }
128
129 # @FUNCTION: python_export_best