1 |
mgorny 13/02/26 14:34:32 |
2 |
|
3 |
Modified: ChangeLog distutils-r1.eclass |
4 |
Log: |
5 |
Re-use python_parallel_foreach_impl() in distutils-r1. |
6 |
|
7 |
Revision Changes Path |
8 |
1.687 eclass/ChangeLog |
9 |
|
10 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.687&view=markup |
11 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.687&content-type=text/plain |
12 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.686&r2=1.687 |
13 |
|
14 |
Index: ChangeLog |
15 |
=================================================================== |
16 |
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v |
17 |
retrieving revision 1.686 |
18 |
retrieving revision 1.687 |
19 |
diff -u -r1.686 -r1.687 |
20 |
--- ChangeLog 26 Feb 2013 14:33:45 -0000 1.686 |
21 |
+++ ChangeLog 26 Feb 2013 14:34:32 -0000 1.687 |
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.686 2013/02/26 14:33:45 mgorny Exp $ |
26 |
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.687 2013/02/26 14:34:32 mgorny Exp $ |
27 |
+ |
28 |
+ 26 Feb 2013; Michał Górny <mgorny@g.o> distutils-r1.eclass: |
29 |
+ Re-use python_parallel_foreach_impl() in distutils-r1. |
30 |
|
31 |
26 Feb 2013; Michał Górny <mgorny@g.o> distutils-r1.eclass, |
32 |
python-r1.eclass: |
33 |
|
34 |
|
35 |
|
36 |
1.56 eclass/distutils-r1.eclass |
37 |
|
38 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/distutils-r1.eclass?rev=1.56&view=markup |
39 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/distutils-r1.eclass?rev=1.56&content-type=text/plain |
40 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/distutils-r1.eclass?r1=1.55&r2=1.56 |
41 |
|
42 |
Index: distutils-r1.eclass |
43 |
=================================================================== |
44 |
RCS file: /var/cvsroot/gentoo-x86/eclass/distutils-r1.eclass,v |
45 |
retrieving revision 1.55 |
46 |
retrieving revision 1.56 |
47 |
diff -u -r1.55 -r1.56 |
48 |
--- distutils-r1.eclass 26 Feb 2013 14:33:45 -0000 1.55 |
49 |
+++ distutils-r1.eclass 26 Feb 2013 14:34:32 -0000 1.56 |
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/distutils-r1.eclass,v 1.55 2013/02/26 14:33:45 mgorny Exp $ |
54 |
+# $Header: /var/cvsroot/gentoo-x86/eclass/distutils-r1.eclass,v 1.56 2013/02/26 14:34:32 mgorny Exp $ |
55 |
|
56 |
# @ECLASS: distutils-r1 |
57 |
# @MAINTAINER: |
58 |
@@ -550,16 +550,7 @@ |
59 |
|
60 |
mkdir -p "${TMPDIR}" || die |
61 |
|
62 |
- if [[ ${DISTUTILS_NO_PARALLEL_BUILD} || ${DISTUTILS_SINGLE_IMPL} ]] |
63 |
- then |
64 |
- "${@}" 2>&1 | tee -a "${T}/build-${EPYTHON}.log" |
65 |
- else |
66 |
- ( |
67 |
- multijob_child_init |
68 |
- "${@}" 2>&1 | tee -a "${T}/build-${EPYTHON}.log" |
69 |
- ) & |
70 |
- multijob_post_fork |
71 |
- fi |
72 |
+ "${@}" |
73 |
|
74 |
if [[ ${DISTUTILS_IN_SOURCE_BUILD} && ! ${DISTUTILS_SINGLE_IMPL} ]] |
75 |
then |
76 |
@@ -591,39 +582,6 @@ |
77 |
"${@}" |
78 |
} |
79 |
|
80 |
-# @FUNCTION: _distutils-r1_multijob_init |
81 |
-# @INTERNAL |
82 |
-# @DESCRIPTION: |
83 |
-# Init multijob, taking the job-count from ${DISTUTILS_JOBS}. |
84 |
-_distutils-r1_multijob_init() { |
85 |
- debug-print-function ${FUNCNAME} "${@}" |
86 |
- |
87 |
- if [[ ! ${DISTUTILS_NO_PARALLEL_BUILD} && ! ${DISTUTILS_SINGLE_IMPL} ]] |
88 |
- then |
89 |
- local opts |
90 |
- if [[ ${DISTUTILS_JOBS} ]]; then |
91 |
- opts=-j${DISTUTILS_JOBS} |
92 |
- else |
93 |
- opts=${MAKEOPTS} |
94 |
- fi |
95 |
- |
96 |
- multijob_init "${opts}" |
97 |
- fi |
98 |
-} |
99 |
- |
100 |
-# @FUNCTION: _distutils-r1_multijob_finish |
101 |
-# @INTERNAL |
102 |
-# @DESCRIPTION: |
103 |
-# Finish multijob if used. |
104 |
-_distutils-r1_multijob_finish() { |
105 |
- debug-print-function ${FUNCNAME} "${@}" |
106 |
- |
107 |
- if [[ ! ${DISTUTILS_NO_PARALLEL_BUILD} && ! ${DISTUTILS_SINGLE_IMPL} ]] |
108 |
- then |
109 |
- multijob_finish |
110 |
- fi |
111 |
-} |
112 |
- |
113 |
# @FUNCTION: _distutils-r1_run_foreach_impl |
114 |
# @INTERNAL |
115 |
# @DESCRIPTION: |
116 |
@@ -635,7 +593,12 @@ |
117 |
set -- distutils-r1_run_phase "${@}" |
118 |
|
119 |
if [[ ! ${DISTUTILS_SINGLE_IMPL} ]]; then |
120 |
- python_foreach_impl "${@}" |
121 |
+ if [[ ${DISTUTILS_NO_PARALLEL_BUILD} || ${DISTUTILS_SINGLE_IMPL} ]] |
122 |
+ then |
123 |
+ python_foreach_impl "${@}" |
124 |
+ else |
125 |
+ python_parallel_foreach_impl "${@}" |
126 |
+ fi |
127 |
else |
128 |
if [[ ! ${EPYTHON} ]]; then |
129 |
die "EPYTHON unset, python-single-r1_pkg_setup not called?!" |
130 |
@@ -657,19 +620,15 @@ |
131 |
distutils-r1_python_prepare_all |
132 |
fi |
133 |
|
134 |
- _distutils-r1_multijob_init |
135 |
if declare -f python_prepare >/dev/null; then |
136 |
_distutils-r1_run_foreach_impl python_prepare |
137 |
fi |
138 |
- _distutils-r1_multijob_finish |
139 |
} |
140 |
|
141 |
distutils-r1_src_configure() { |
142 |
- _distutils-r1_multijob_init |
143 |
if declare -f python_configure >/dev/null; then |
144 |
_distutils-r1_run_foreach_impl python_configure |
145 |
fi |
146 |
- _distutils-r1_multijob_finish |
147 |
|
148 |
if declare -f python_configure_all >/dev/null; then |
149 |
_distutils-r1_run_common_phase python_configure_all |
150 |
@@ -679,13 +638,11 @@ |
151 |
distutils-r1_src_compile() { |
152 |
debug-print-function ${FUNCNAME} "${@}" |
153 |
|
154 |
- _distutils-r1_multijob_init |
155 |
if declare -f python_compile >/dev/null; then |
156 |
_distutils-r1_run_foreach_impl python_compile |
157 |
else |
158 |
_distutils-r1_run_foreach_impl distutils-r1_python_compile |
159 |
fi |
160 |
- _distutils-r1_multijob_finish |
161 |
|
162 |
if declare -f python_compile_all >/dev/null; then |
163 |
_distutils-r1_run_common_phase python_compile_all |
164 |
@@ -695,11 +652,9 @@ |
165 |
distutils-r1_src_test() { |
166 |
debug-print-function ${FUNCNAME} "${@}" |
167 |
|
168 |
- _distutils-r1_multijob_init |
169 |
if declare -f python_test >/dev/null; then |
170 |
_distutils-r1_run_foreach_impl python_test |
171 |
fi |
172 |
- _distutils-r1_multijob_finish |
173 |
|
174 |
if declare -f python_test_all >/dev/null; then |
175 |
_distutils-r1_run_common_phase python_test_all |
176 |
@@ -709,13 +664,11 @@ |
177 |
distutils-r1_src_install() { |
178 |
debug-print-function ${FUNCNAME} "${@}" |
179 |
|
180 |
- _distutils-r1_multijob_init |
181 |
if declare -f python_install >/dev/null; then |
182 |
_distutils-r1_run_foreach_impl python_install |
183 |
else |
184 |
_distutils-r1_run_foreach_impl distutils-r1_python_install |
185 |
fi |
186 |
- _distutils-r1_multijob_finish |
187 |
|
188 |
if declare -f python_install_all >/dev/null; then |
189 |
_distutils-r1_run_common_phase python_install_all |