1 |
Hello, developers. |
2 |
|
3 |
The distutils-r1 eclass (and the python-r1 eclass used it to implement |
4 |
it) have seen a few minor changes recently. Hopefully, they will make |
5 |
Python ebuild writing easier and more predictable. |
6 |
|
7 |
|
8 |
Firstly, we have completely removed the parallel run support. This |
9 |
means that in particular: |
10 |
|
11 |
a. all of python_* phases are always run in series. |
12 |
|
13 |
b. python_parallel_foreach_impl() is deprecated, and works as alias to |
14 |
python_foreach_impl(). You can replace it with the latter at any time. |
15 |
|
16 |
c. DISTUTILS_JOBS and DISTUTILS_NO_PARALLEL_BUILD no longer have any |
17 |
meaning. The former may be removed from make.conf, the latter from |
18 |
ebuilds, |
19 |
|
20 |
d. All non-local variables set within sub-phase functions will be |
21 |
passed through to the next sub-phase executions. Please ensure to use |
22 |
'local' whenever necessary ;). |
23 |
|
24 |
The rationale can be found at [1]. Long story short, the parallel runs |
25 |
gave real gains only in corner cases, while some more corner cases |
26 |
required them disabled. They triggered a lot of bugs in build systems |
27 |
which imposed a serious amount of work on our developers, and often |
28 |
confused our users. |
29 |
|
30 |
|
31 |
Secondly, we have added a clear guarantee that the working directory |
32 |
is restored after each sub-phase function invocation returns. In other |
33 |
words, you are free to 'cd' anywhere you want in a sub-phase function, |
34 |
and you can safely assume that the next Python implementation will |
35 |
start with the same initial directory, and that that directory will be |
36 |
restored once distutils-r1_src_* leaves. |
37 |
|
38 |
This is pretty much a bugfix for the first change. Since parallel runs |
39 |
caused sub-phase functions to be run in subshells, the directory |
40 |
changes within didn't affect the further calls. Additionally, |
41 |
DISTUTILS_IN_SOURCE_BUILD restored working directory on leave. Since we |
42 |
no longer have subshells and bugs started appearing, we decided to |
43 |
remove these implicit conditionals and just preserve working directory |
44 |
unconditionally. |
45 |
|
46 |
|
47 |
Hope these changes make the eclasses a bit easier on you. We still have |
48 |
over 250 distutils ebuilds to update [2]! Have fun. |
49 |
|
50 |
|
51 |
[1]:http://thread.gmane.org/gmane.linux.gentoo.python/641 |
52 |
[2]:http://dev.gentoo.org/~mgorny/python-r1/conversion.xhtml |
53 |
|
54 |
-- |
55 |
Best regards, |
56 |
Michał Górny |