Re: [opensuse-packaging] How to deal with Python .pyc and .pyo files?
Michal Marek napsal(a):
Jan Matejek wrote:
Second worst case would be if you upgraded to a new major version of python, i.e. from 1.5 to 2.0. In that case python would report errors about bad bytecode, and i'm really not sure if it would recompile automatically. But i think it would.
So... could python stop reporting errors in such cases and just silently ignore the precompiled files? For mere mortals it's hard to understand that they can use the same package with ELF binaries for years, but have to rebuild python packages each time the python bytecode format changes.
well sorry if python bytecode format changes more often than ELF standard :P There was no major (read 'incompatible') change since 2.0 release, i just went through the changelogs. So if you see any such errors somewhere, please report a bug and i'll make them go away. And, there *will* be a big breakage when python3k comes. But that is going to be an entirely new level of fun - py3k will not be backwards compatible and most apps will need to be modified. Let's not concern ourselves with that, for now...
"Why scripts and bytecode files have to be in lib64" comes as next ;)
Because there is no better place for them, that's why ;e) Either we have to keep them in lib[64], and then they're arch-dependent because of that. Or, we go the Ubuntu way and store all .py in /usr/share/python or something, but that's a lot of trouble in itself (half-binary-half-python packages need to be installed in an interesting way, which can be a problem if you don't use distutils), and to add insult to injury, it violates FHS. Or somebody comes up with a clever way to keep stuff in lib and make python in lib64 recognize it and not break on binary files it finds there. (which i've been trying to do, but with little success so far) regards m.
Michal --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
--------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
jan matejek wrote:
Michal Marek napsal(a):
So... could python stop reporting errors in such cases and just silently ignore the precompiled files? For mere mortals it's hard to understand that they can use the same package with ELF binaries for years, but have to rebuild python packages each time the python bytecode format changes.
well sorry if python bytecode format changes more often than ELF standard :P There was no major (read 'incompatible') change since 2.0 release, i just went through the changelogs.
Then this is one more reason not to install python stuff into a versioned directory. I thought the whole point of using .../python-$major.$minor is to avoid problems with incompatible bytecode files. Michal --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
participants (2)
-
jan matejek
-
Michal Marek