> 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
_______________________________________________
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint

Reply via email to