1 |
On Sun, Sep 30, 2012 at 10:58:06AM +0200, Fabian Groffen wrote: |
2 |
> On 30-09-2012 10:31:17 +0200, Pacho Ramos wrote: |
3 |
> > > > Personally, I usually run: |
4 |
> > > > - python_clean_py-compile_files -> Clean py-compile files to disable |
5 |
> > > > byte-compilation allowing us to drop all various ways of doing this that |
6 |
> > > > were living in the tree some time ago. |
7 |
> > > |
8 |
> > > Hmm, what's the problem with compiling them? Do you mean some case when |
9 |
> > > the results of the compilation are different from the way done |
10 |
> > > by the eclass? |
11 |
> > > |
12 |
> > |
13 |
> > Well, if I don't misremember, we currently prefer to compile them at |
14 |
> > postinst phase instead of during src_compile, but maybe this is no |
15 |
> > longer needed (no idea :( ) |
16 |
> |
17 |
> The files are indeed cache, and should be generated on the system that |
18 |
> installs the files, not the system that builds them. They are currently |
19 |
> outside of VDB. pyc files store the path to the original files, so |
20 |
> generating in ${ROOT} yields in wrong paths. Python sometimes |
21 |
> regenerates the files when it runs. It may as well just ignore them |
22 |
> (since they are newer but non-matching, unclear to me). |
23 |
|
24 |
.pyc should be compatible within slotted python versions; |
25 |
recompilation occurs if .pyc/.pyo mtime differs from the originating |
26 |
.py. Via EAPI=3 mtime gurantees, that should be addressed- below |
27 |
that, compilation via pkg_postinst is necessary due to the lack of |
28 |
mtime guarantees. |
29 |
|
30 |
> In the worst case it returns "Bad marshalling data". |
31 |
|
32 |
Examples wanted for this. If this occurs, that's a python bug- one |
33 |
exception... portage (figures). They install into a non |
34 |
/usr/lib/python* location, meaning the .pyc/.pyo from py2.6 is |
35 |
exposed/accessed for py2.7 for example. |
36 |
|
37 |
That said, a .pyc/.pyo from an older python version causing a blow up |
38 |
in a differing python version hasn't occurred since the 2.3 -> 2.4 |
39 |
transition (if memory serves). |
40 |
|
41 |
Either way, examples desired please. |
42 |
~harring |