On 16 February 2018 at 11:25, Jan Kurik <jkurik@redhat.com> wrote:
Proposed Self Contained Change: No more automagic Python bytecompilation
https://fedoraproject.org/wiki/Changes/No_more_automagic_Python_bytecompilation


Owner(s):
  * Miro Hrončok <mhroncok at redhat dot com>
  * Petr Viktorin <pviktori at redhat dot com>


The current way of automatic Python byte-compiling of files outside
Python-specific directories is too magical and error-prone. It is
built on heuristics that are increasingly wrong.

Maybe instead throwing the baby out with the bathwater it would be better to spend some time on prepare set of rules/advises/policies about set of conditions which needs to be fulfilled about such scripts, and/or even promote pushing necessary changes to original packages source trees?
Is it good to tolerate install for example python modules outside Python-specific directories?

BTW python bytecode files. Three questions:
1) What do you guys are thinking about remove source .py files and move them to debuginfo/debugsource packages?

2) Currently seems are generates .pyc and .pyo files. Why not only .pyo files? (python optimized bytecode). If .pyo files are installes .pyc are redundant. Isn't it?

3) Currently all .pyc/.pyo/.py files are installed in %{_libdir}/python<py.ver> tree. In reality all those files are arch independent. Why not installed those files in %{_datadir}/python<py.ver>? This would allow build many/most of the python modules as noarch packages.

kloczek
-- 
Tomasz Kłoczko | LinkedIn: http://lnkd.in/FXPWxH