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