Re: F29 Self Contained Change: No more automagic Python bytecompilation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 16.2.2018 14:09, Tomasz Kłoczko wrote:
On 16 February 2018 at 11:25, Jan Kurik <jkurik@xxxxxxxxxx <mailto:jkurik@xxxxxxxxxx>> wrote:

    Proposed Self Contained Change: No more automagic Python bytecompilation
    https://fedoraproject.org/wiki/Changes/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?

I'm afraid I don't understand this part.

Is it good to tolerate install for examplepython modules outside Python-specific directories?

It is good to tolerate private python modules in application specific directories, such as /usr/share/coolapp/plugins/. It's completely valid use case.

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?

This was considered several times in the past, but usually never seriously. The possible problems overweight the benefit. Users (and sysadmins, and we) are used to those files being there.

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?

I believe this depends on how you invoke your Python when your import those modules.

3) Currently all .pyc/.pyo/.py files are installed in %{_libdir}/python<py.ver> tree.

Actually, for noarch packages this is /usr/lib/pythonX.Y even on 64bits system.

In reality all those files are arch independent.

Yes, see above.

Why not installed those files in %{_datadir}/python<py.ver>?

There is a bug open for this for 8 years. Some day, maybe.

https://bugzilla.redhat.com/show_bug.cgi?id=543756

This would allow build many/most of the python modules as noarch packages.

We do that, see above.

--
Miro Hrončok
--
Phone: +420777974800
IRC: mhroncok
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux