1 |
commit: a2cb4f6a8da80865a65bbebd5cf749e4cab8ae62 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Aug 18 07:54:48 2020 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Aug 18 08:03:54 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a2cb4f6a |
7 |
|
8 |
dev-lang/python: Respect MAKEOPTS throughout the build |
9 |
|
10 |
Closes: https://bugs.gentoo.org/737660 |
11 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
12 |
|
13 |
dev-lang/python/python-3.6.11-r2.ebuild | 14 +++++++++++--- |
14 |
dev-lang/python/python-3.7.8-r2.ebuild | 14 +++++++++++--- |
15 |
dev-lang/python/python-3.8.5.ebuild | 15 ++++++++++++--- |
16 |
dev-lang/python/python-3.9.0_rc1.ebuild | 16 ++++++++++++---- |
17 |
4 files changed, 46 insertions(+), 13 deletions(-) |
18 |
|
19 |
diff --git a/dev-lang/python/python-3.6.11-r2.ebuild b/dev-lang/python/python-3.6.11-r2.ebuild |
20 |
index 1fb0d08c949..ea7d7c2ab71 100644 |
21 |
--- a/dev-lang/python/python-3.6.11-r2.ebuild |
22 |
+++ b/dev-lang/python/python-3.6.11-r2.ebuild |
23 |
@@ -4,7 +4,8 @@ |
24 |
EAPI="7" |
25 |
WANT_LIBTOOL="none" |
26 |
|
27 |
-inherit autotools flag-o-matic pax-utils python-utils-r1 toolchain-funcs |
28 |
+inherit autotools flag-o-matic multiprocessing pax-utils \ |
29 |
+ python-utils-r1 toolchain-funcs |
30 |
|
31 |
MY_P="Python-${PV}" |
32 |
PYVER=$(ver_cut 1-2) |
33 |
@@ -81,6 +82,11 @@ src_prepare() { |
34 |
configure.ac \ |
35 |
setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@" |
36 |
|
37 |
+ # force correct number of jobs |
38 |
+ # https://bugs.gentoo.org/737660 |
39 |
+ local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)") |
40 |
+ sed -i -e "/self\.parallel/s:True:${jobs}:" setup.py || die |
41 |
+ |
42 |
eautoreconf |
43 |
} |
44 |
|
45 |
@@ -193,10 +199,12 @@ src_test() { |
46 |
|
47 |
# bug 660358 |
48 |
local -x COLUMNS=80 |
49 |
- |
50 |
local -x PYTHONDONTWRITEBYTECODE= |
51 |
|
52 |
- emake test EXTRATESTOPTS="-u-network" CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty |
53 |
+ local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)") |
54 |
+ |
55 |
+ emake test EXTRATESTOPTS="-u-network -j${jobs}" \ |
56 |
+ CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty |
57 |
local result=$? |
58 |
|
59 |
for test in ${skipped_tests}; do |
60 |
|
61 |
diff --git a/dev-lang/python/python-3.7.8-r2.ebuild b/dev-lang/python/python-3.7.8-r2.ebuild |
62 |
index a2b8b787199..0daef877b50 100644 |
63 |
--- a/dev-lang/python/python-3.7.8-r2.ebuild |
64 |
+++ b/dev-lang/python/python-3.7.8-r2.ebuild |
65 |
@@ -4,7 +4,8 @@ |
66 |
EAPI="7" |
67 |
WANT_LIBTOOL="none" |
68 |
|
69 |
-inherit autotools flag-o-matic pax-utils python-utils-r1 toolchain-funcs |
70 |
+inherit autotools flag-o-matic multiprocessing pax-utils \ |
71 |
+ python-utils-r1 toolchain-funcs |
72 |
|
73 |
MY_P="Python-${PV}" |
74 |
PYVER=$(ver_cut 1-2) |
75 |
@@ -73,6 +74,11 @@ src_prepare() { |
76 |
sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \ |
77 |
setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@" |
78 |
|
79 |
+ # force correct number of jobs |
80 |
+ # https://bugs.gentoo.org/737660 |
81 |
+ local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)") |
82 |
+ sed -i -e "/self\.parallel/s:True:${jobs}:" setup.py || die |
83 |
+ |
84 |
eautoreconf |
85 |
} |
86 |
|
87 |
@@ -180,10 +186,12 @@ src_test() { |
88 |
|
89 |
# bug 660358 |
90 |
local -x COLUMNS=80 |
91 |
- |
92 |
local -x PYTHONDONTWRITEBYTECODE= |
93 |
|
94 |
- emake test EXTRATESTOPTS="-u-network" CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty |
95 |
+ local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)") |
96 |
+ |
97 |
+ emake test EXTRATESTOPTS="-u-network -j${jobs}" \ |
98 |
+ CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty |
99 |
local result=$? |
100 |
|
101 |
for test in ${skipped_tests}; do |
102 |
|
103 |
diff --git a/dev-lang/python/python-3.8.5.ebuild b/dev-lang/python/python-3.8.5.ebuild |
104 |
index c2a10d03855..df05aaedef1 100644 |
105 |
--- a/dev-lang/python/python-3.8.5.ebuild |
106 |
+++ b/dev-lang/python/python-3.8.5.ebuild |
107 |
@@ -4,7 +4,8 @@ |
108 |
EAPI="7" |
109 |
WANT_LIBTOOL="none" |
110 |
|
111 |
-inherit autotools flag-o-matic pax-utils python-utils-r1 toolchain-funcs |
112 |
+inherit autotools flag-o-matic multiprocessing pax-utils \ |
113 |
+ python-utils-r1 toolchain-funcs |
114 |
|
115 |
MY_P="Python-${PV}" |
116 |
PYVER=$(ver_cut 1-2) |
117 |
@@ -73,6 +74,12 @@ src_prepare() { |
118 |
sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \ |
119 |
setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@" |
120 |
|
121 |
+ # force correct number of jobs |
122 |
+ # https://bugs.gentoo.org/737660 |
123 |
+ local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)") |
124 |
+ sed -i -e "s:-j0:-j${jobs}:" Makefile.pre.in || die |
125 |
+ sed -i -e "/self\.parallel/s:True:${jobs}:" setup.py || die |
126 |
+ |
127 |
eautoreconf |
128 |
} |
129 |
|
130 |
@@ -185,10 +192,12 @@ src_test() { |
131 |
|
132 |
# bug 660358 |
133 |
local -x COLUMNS=80 |
134 |
- |
135 |
local -x PYTHONDONTWRITEBYTECODE= |
136 |
|
137 |
- emake test EXTRATESTOPTS="-u-network" CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty |
138 |
+ local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)") |
139 |
+ |
140 |
+ emake test EXTRATESTOPTS="-u-network -j${jobs}" \ |
141 |
+ CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty |
142 |
local result=$? |
143 |
|
144 |
for test in ${skipped_tests}; do |
145 |
|
146 |
diff --git a/dev-lang/python/python-3.9.0_rc1.ebuild b/dev-lang/python/python-3.9.0_rc1.ebuild |
147 |
index 461adca3a23..6bf6b905d71 100644 |
148 |
--- a/dev-lang/python/python-3.9.0_rc1.ebuild |
149 |
+++ b/dev-lang/python/python-3.9.0_rc1.ebuild |
150 |
@@ -4,8 +4,8 @@ |
151 |
EAPI="7" |
152 |
WANT_LIBTOOL="none" |
153 |
|
154 |
-inherit autotools check-reqs flag-o-matic pax-utils python-utils-r1 \ |
155 |
- toolchain-funcs |
156 |
+inherit autotools check-reqs flag-o-matic multiprocessing pax-utils \ |
157 |
+ python-utils-r1 toolchain-funcs |
158 |
|
159 |
MY_P="Python-${PV/_/}" |
160 |
PYVER=$(ver_cut 1-2) |
161 |
@@ -85,6 +85,12 @@ src_prepare() { |
162 |
sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \ |
163 |
setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@" |
164 |
|
165 |
+ # force correct number of jobs |
166 |
+ # https://bugs.gentoo.org/737660 |
167 |
+ local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)") |
168 |
+ sed -i -e "s:-j0:-j${jobs}:" Makefile.pre.in || die |
169 |
+ sed -i -e "/self\.parallel/s:True:${jobs}:" setup.py || die |
170 |
+ |
171 |
eautoreconf |
172 |
} |
173 |
|
174 |
@@ -197,10 +203,12 @@ src_test() { |
175 |
|
176 |
# bug 660358 |
177 |
local -x COLUMNS=80 |
178 |
- |
179 |
local -x PYTHONDONTWRITEBYTECODE= |
180 |
|
181 |
- emake test EXTRATESTOPTS="-u-network" CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty |
182 |
+ local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)") |
183 |
+ |
184 |
+ emake test EXTRATESTOPTS="-u-network -j${jobs}" \ |
185 |
+ CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty |
186 |
local result=$? |
187 |
|
188 |
for test in ${skipped_tests}; do |