1 |
mgorny 12/12/01 10:54:50 |
2 |
|
3 |
Modified: ChangeLog distutils-r1.eclass |
4 |
Log: |
5 |
Support parallel builds using multiprocessing eclass. |
6 |
|
7 |
Revision Changes Path |
8 |
1.537 eclass/ChangeLog |
9 |
|
10 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.537&view=markup |
11 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.537&content-type=text/plain |
12 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.536&r2=1.537 |
13 |
|
14 |
Index: ChangeLog |
15 |
=================================================================== |
16 |
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v |
17 |
retrieving revision 1.536 |
18 |
retrieving revision 1.537 |
19 |
diff -u -r1.536 -r1.537 |
20 |
--- ChangeLog 1 Dec 2012 10:53:40 -0000 1.536 |
21 |
+++ ChangeLog 1 Dec 2012 10:54:50 -0000 1.537 |
22 |
@@ -1,6 +1,9 @@ |
23 |
# ChangeLog for eclass directory |
24 |
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 |
25 |
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.536 2012/12/01 10:53:40 mgorny Exp $ |
26 |
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.537 2012/12/01 10:54:50 mgorny Exp $ |
27 |
+ |
28 |
+ 01 Dec 2012; Michał Górny <mgorny@g.o> distutils-r1.eclass: |
29 |
+ Support parallel builds using multiprocessing eclass. |
30 |
|
31 |
01 Dec 2012; Michał Górny <mgorny@g.o> distutils-r1.eclass: |
32 |
Create the wrapper symlinks directly in _distutils-r1_rename_scripts rather |
33 |
|
34 |
|
35 |
|
36 |
1.24 eclass/distutils-r1.eclass |
37 |
|
38 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/distutils-r1.eclass?rev=1.24&view=markup |
39 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/distutils-r1.eclass?rev=1.24&content-type=text/plain |
40 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/distutils-r1.eclass?r1=1.23&r2=1.24 |
41 |
|
42 |
Index: distutils-r1.eclass |
43 |
=================================================================== |
44 |
RCS file: /var/cvsroot/gentoo-x86/eclass/distutils-r1.eclass,v |
45 |
retrieving revision 1.23 |
46 |
retrieving revision 1.24 |
47 |
diff -u -r1.23 -r1.24 |
48 |
--- distutils-r1.eclass 1 Dec 2012 10:53:40 -0000 1.23 |
49 |
+++ distutils-r1.eclass 1 Dec 2012 10:54:50 -0000 1.24 |
50 |
@@ -1,6 +1,6 @@ |
51 |
# Copyright 1999-2012 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.23 2012/12/01 10:53:40 mgorny Exp $ |
54 |
+# $Header: /var/cvsroot/gentoo-x86/eclass/distutils-r1.eclass,v 1.24 2012/12/01 10:54:50 mgorny Exp $ |
55 |
|
56 |
# @ECLASS: distutils-r1 |
57 |
# @MAINTAINER: |
58 |
@@ -57,7 +57,7 @@ |
59 |
|
60 |
if [[ ! ${_DISTUTILS_R1} ]]; then |
61 |
|
62 |
-inherit eutils python-r1 |
63 |
+inherit eutils multiprocessing python-r1 |
64 |
|
65 |
fi |
66 |
|
67 |
@@ -130,6 +130,29 @@ |
68 |
# 'build --build-base ${BUILD_DIR}' to enforce keeping & using built |
69 |
# files in the specific root. |
70 |
|
71 |
+# @ECLASS-VARIABLE: DISTUTILS_NO_PARALLEL_BUILD |
72 |
+# @DEFAULT_UNSET |
73 |
+# @DESCRIPTION: |
74 |
+# If set to a non-null value, the parallel build feature will |
75 |
+# be disabled. |
76 |
+# |
77 |
+# When parallel builds are used, the implementation-specific sub-phases |
78 |
+# for selected Python implementation will be run in parallel. This will |
79 |
+# increase build efficiency with distutils which does not do parallel |
80 |
+# builds. |
81 |
+# |
82 |
+# This variable can be used to disable the afore-mentioned feature |
83 |
+# in case it causes issues with the package. |
84 |
+ |
85 |
+# |
86 |
+# If in-source builds are used, the eclass will create a copy of package |
87 |
+# sources for each Python implementation in python_prepare_all(), |
88 |
+# and work on that copy afterwards. |
89 |
+# |
90 |
+# If out-of-source builds are used, the eclass will instead work |
91 |
+# on the sources directly, prepending setup.py arguments with |
92 |
+# 'build --build-base ${BUILD_DIR}' to enforce keeping & using built |
93 |
+# files in the specific root. |
94 |
# @ECLASS-VARIABLE: mydistutilsargs |
95 |
# @DEFAULT_UNSET |
96 |
# @DESCRIPTION: |
97 |
@@ -356,7 +379,11 @@ |
98 |
export PYTHONPATH |
99 |
fi |
100 |
|
101 |
- "${@}" || die "${1} failed." |
102 |
+ if [[ ${DISTUTILS_NO_PARALLEL_BUILD} ]]; then |
103 |
+ "${@}" || die "${1} failed." |
104 |
+ else |
105 |
+ multijob_child_init "${@}" || die "${1} failed." |
106 |
+ fi |
107 |
|
108 |
if [[ ${DISTUTILS_IN_SOURCE_BUILD} ]]; then |
109 |
popd &>/dev/null || die |
110 |
@@ -373,19 +400,23 @@ |
111 |
distutils-r1_python_prepare_all |
112 |
fi |
113 |
|
114 |
+ multijob_init |
115 |
if declare -f python_prepare >/dev/null; then |
116 |
python_foreach_impl distutils-r1_run_phase python_prepare |
117 |
else |
118 |
python_foreach_impl distutils-r1_run_phase distutils-r1_python_prepare |
119 |
fi |
120 |
+ multijob_finish |
121 |
} |
122 |
|
123 |
distutils-r1_src_configure() { |
124 |
+ multijob_init |
125 |
if declare -f python_configure >/dev/null; then |
126 |
python_foreach_impl distutils-r1_run_phase python_configure |
127 |
else |
128 |
python_foreach_impl distutils-r1_run_phase distutils-r1_python_configure |
129 |
fi |
130 |
+ multijob_finish |
131 |
|
132 |
if declare -f python_configure_all >/dev/null; then |
133 |
python_configure_all |
134 |
@@ -395,11 +426,13 @@ |
135 |
distutils-r1_src_compile() { |
136 |
debug-print-function ${FUNCNAME} "${@}" |
137 |
|
138 |
+ multijob_init |
139 |
if declare -f python_compile >/dev/null; then |
140 |
python_foreach_impl distutils-r1_run_phase python_compile |
141 |
else |
142 |
python_foreach_impl distutils-r1_run_phase distutils-r1_python_compile |
143 |
fi |
144 |
+ multijob_finish |
145 |
|
146 |
if declare -f python_compile_all >/dev/null; then |
147 |
python_compile_all |
148 |
@@ -409,11 +442,13 @@ |
149 |
distutils-r1_src_test() { |
150 |
debug-print-function ${FUNCNAME} "${@}" |
151 |
|
152 |
+ multijob_init |
153 |
if declare -f python_test >/dev/null; then |
154 |
python_foreach_impl distutils-r1_run_phase python_test |
155 |
else |
156 |
python_foreach_impl distutils-r1_run_phase distutils-r1_python_test |
157 |
fi |
158 |
+ multijob_finish |
159 |
|
160 |
if declare -f python_test_all >/dev/null; then |
161 |
python_test_all |
162 |
@@ -423,11 +458,13 @@ |
163 |
distutils-r1_src_install() { |
164 |
debug-print-function ${FUNCNAME} "${@}" |
165 |
|
166 |
+ multijob_init |
167 |
if declare -f python_install >/dev/null; then |
168 |
python_foreach_impl distutils-r1_run_phase python_install |
169 |
else |
170 |
python_foreach_impl distutils-r1_run_phase distutils-r1_python_install |
171 |
fi |
172 |
+ multijob_finish |
173 |
|
174 |
if declare -f python_install_all >/dev/null; then |
175 |
python_install_all |