[Rpm-maint] [rpm-software-management/rpm] Provide a way to opt out from automagic Python bytecompilation (#434)

Miro Hrončok notifications at github.com
Tue Apr 24 19:59:58 UTC 2018


> Meanwhile, there is no reason I know of that an ordered list of python interpreters in PATH (or in /usr/bin if you must) cannot be tested for existence and use the first found interpreter to byte compile.

The reason is that the packager knows what are those py files for. Is it a plugin for a tool that uses pypy3? Or is it a module for an app that runs on python2? Based on that, that very Python version needs to be used to bytecompile it (sometimes even multiple python version need to be used). The code can be python2+python3+pypy compatible yet in the context of the OS it is intended for a specific interpreter. No automation can decide that. No matter how dark the magic of file is, no matter how smart is the heuristics. [In the face of ambiguity, refuse the temptation to guess.](https://www.python.org/dev/peps/pep-0020/) An idea of a script that bytecompiles Python files with some Python interpreter (that can be vaguely specified for all the files only) is wrong. This an attempt to deprecate it.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/434#issuecomment-384060470
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20180424/6634f2ba/attachment-0001.html>


More information about the Rpm-maint mailing list