1 |
On Tue, 1 Jan 2013 14:15:35 -0500 |
2 |
Mike Gilbert <floppym@g.o> wrote: |
3 |
|
4 |
> On Tue, Jan 1, 2013 at 11:57 AM, Michał Górny <mgorny@g.o> wrote: |
5 |
> > --- |
6 |
> > gx86/eclass/distutils-r1.eclass | 44 ++++++++++++++++++++++++++++------------- |
7 |
> > 1 file changed, 30 insertions(+), 14 deletions(-) |
8 |
> > |
9 |
> > diff --git a/gx86/eclass/distutils-r1.eclass b/gx86/eclass/distutils-r1.eclass |
10 |
> > index e288c2c..3312505 100644 |
11 |
> > --- a/gx86/eclass/distutils-r1.eclass |
12 |
> > +++ b/gx86/eclass/distutils-r1.eclass |
13 |
> > @@ -68,6 +68,14 @@ if [[ ! ${_DISTUTILS_R1} ]]; then |
14 |
> > RDEPEND=${PYTHON_DEPS} |
15 |
> > DEPEND=${PYTHON_DEPS} |
16 |
> > |
17 |
> > +# @ECLASS-VARIABLE: DISTUTILS_JOBS |
18 |
> > +# @DEFAULT_UNSET |
19 |
> > +# @DECRIPTION: |
20 |
> > +# The number of parallel jobs to run for distutils-r1 parallel builds. |
21 |
> > +# If unset, the job-count in ${MAKEOPTS} will be used. |
22 |
> > +# |
23 |
> > +# This variable is intended to be set in make.conf. |
24 |
> > + |
25 |
> > # @ECLASS-VARIABLE: PATCHES |
26 |
> > # @DEFAULT_UNSET |
27 |
> > # @DESCRIPTION: |
28 |
> > @@ -144,15 +152,6 @@ DEPEND=${PYTHON_DEPS} |
29 |
> > # This variable can be used to disable the afore-mentioned feature |
30 |
> > # in case it causes issues with the package. |
31 |
> > |
32 |
> > -# |
33 |
> > -# If in-source builds are used, the eclass will create a copy of package |
34 |
> > -# sources for each Python implementation in python_prepare_all(), |
35 |
> > -# and work on that copy afterwards. |
36 |
> > -# |
37 |
> > -# If out-of-source builds are used, the eclass will instead work |
38 |
> > -# on the sources directly, prepending setup.py arguments with |
39 |
> > -# 'build --build-base ${BUILD_DIR}' to enforce keeping & using built |
40 |
> > -# files in the specific root. |
41 |
> > # @ECLASS-VARIABLE: mydistutilsargs |
42 |
> > # @DEFAULT_UNSET |
43 |
> > # @DESCRIPTION: |
44 |
> > @@ -425,6 +424,23 @@ _distutils-r1_run_common_phase() { |
45 |
> > "${@}" |
46 |
> > } |
47 |
> > |
48 |
> > +# @FUNCTION: _distutils-r1_multijob_init |
49 |
> > +# @INTERNAL |
50 |
> > +# @DESCRIPTION: |
51 |
> > +# Init multijob, taking the job-count from ${DISTUTILS_JOBS}. |
52 |
> > +_distutils-r1_multijob_init() { |
53 |
> > + debug-print-function ${FUNCNAME} "${@}" |
54 |
> > + |
55 |
> > + local opts |
56 |
> > + if [[ ${DISTUTILS_JOBS} ]]; then |
57 |
> > + opts=-j${DISTUTILS_JOBS} |
58 |
> > + else |
59 |
> > + opts=${MAKEOPTS} |
60 |
> > + fi |
61 |
> > + |
62 |
> > + multijob_init "${opts}" |
63 |
> > +} |
64 |
> > + |
65 |
> > distutils-r1_src_prepare() { |
66 |
> > debug-print-function ${FUNCNAME} "${@}" |
67 |
> > |
68 |
> > @@ -435,7 +451,7 @@ distutils-r1_src_prepare() { |
69 |
> > distutils-r1_python_prepare_all |
70 |
> > fi |
71 |
> > |
72 |
> > - multijob_init |
73 |
> > + _distutils-r1_multijob_init |
74 |
> > if declare -f python_prepare >/dev/null; then |
75 |
> > python_foreach_impl distutils-r1_run_phase python_prepare |
76 |
> > else |
77 |
> > @@ -445,7 +461,7 @@ distutils-r1_src_prepare() { |
78 |
> > } |
79 |
> > |
80 |
> > distutils-r1_src_configure() { |
81 |
> > - multijob_init |
82 |
> > + _distutils-r1_multijob_init |
83 |
> > if declare -f python_configure >/dev/null; then |
84 |
> > python_foreach_impl distutils-r1_run_phase python_configure |
85 |
> > else |
86 |
> > @@ -461,7 +477,7 @@ distutils-r1_src_configure() { |
87 |
> > distutils-r1_src_compile() { |
88 |
> > debug-print-function ${FUNCNAME} "${@}" |
89 |
> > |
90 |
> > - multijob_init |
91 |
> > + _distutils-r1_multijob_init |
92 |
> > if declare -f python_compile >/dev/null; then |
93 |
> > python_foreach_impl distutils-r1_run_phase python_compile |
94 |
> > else |
95 |
> > @@ -477,7 +493,7 @@ distutils-r1_src_compile() { |
96 |
> > distutils-r1_src_test() { |
97 |
> > debug-print-function ${FUNCNAME} "${@}" |
98 |
> > |
99 |
> > - multijob_init |
100 |
> > + _distutils-r1_multijob_init |
101 |
> > if declare -f python_test >/dev/null; then |
102 |
> > python_foreach_impl distutils-r1_run_phase python_test |
103 |
> > else |
104 |
> > @@ -493,7 +509,7 @@ distutils-r1_src_test() { |
105 |
> > distutils-r1_src_install() { |
106 |
> > debug-print-function ${FUNCNAME} "${@}" |
107 |
> > |
108 |
> > - multijob_init |
109 |
> > + _distutils-r1_multijob_init |
110 |
> > if declare -f python_install >/dev/null; then |
111 |
> > python_foreach_impl distutils-r1_run_phase python_install |
112 |
> > else |
113 |
> > -- |
114 |
> > 1.8.0.2 |
115 |
> > |
116 |
> |
117 |
> Seems ok. Was this requested by someone? |
118 |
|
119 |
By me ;). |
120 |
|
121 |
I have MAKEOPTS=-j6 because of distcc, and it kills my system with |
122 |
nose's tests. |
123 |
|
124 |
-- |
125 |
Best regards, |
126 |
Michał Górny |