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