On Fri, Feb 17, 2017 at 7:03 PM, Stefan Bruens <stefan.bruens@rwth-aachen.de> wrote:
On Samstag, 18. Februar 2017 00:04:36 CET Ferdinand Thiessen wrote:
On 17.02.2017 23:48, Stefan Bruens wrote:
Ever wondered what happens if there *are* pyc bytecode files? Python *stats* the python source file, looks for a corresponding bytecode file in the (python2: source; python3: __pycache__) directory, reads the bytecode file header, compares the header timestamp with the change time from the earlier stat call, and executes the byte code. The contents of the source file are *not* read at all.
At least I know CPython (the "default" one), Jython (uses the JVM), PyPy and then there are several other programs that are using python for scripting (some of them also are loading python libraries from system, so they would have been patched to work with pyc code).
Currently we ship bytecode for every supported Python interpreter (for Tumbleweed, that is CPython 2.7 and CPython 3.5), accompanied *each time* by the source code. *If* the bytecode is available, the sources are *not* read.
The sources are always read if the Python code calls for them to be read, such as with a bunch of functions in the "inspect" module.
But is there one good point for dropping the python sources? Of cause you can save some space, but that would be about some MiB (on my system 24MiB), but which system does not have enough space to for that?
As I already said, there are small devices, like Raspberry Pi, there are containers. It also saves download bandwidth on both the mirrors as the users machine.
Does rasberry pi upstream include source files or only pyc files? -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org