Moin, On Feb 17, 17 05:33:02 +0000, Bernhard M. Wiedemann wrote:
Via https://en.opensuse.org/openSUSE:Reproducible_Builds
I found that when we build python packages like python-amqp or python-binplist
it contains a .pyc file for every .py file and for every build these .pyc files differ, because they contain the timestamp of the corresponding source file and for some source files this is the time of build.
http://rb.zq1.de/compare.factory-20170208/python-amqp.html#content
http://rb.zq1.de/compare.factory-20170208/python-binplist.html#content
I was wondering how to best get those to build bit-by-bit identical rpms.
I assume, we want to keep the concept of .pyc files, since they provide some performance gain (e.g. I measured 'openstack --help' taking only 1.5 seconds with .pyc files versus 2.5 seconds without (on another machine it was 12 vs 13 seconds))
Hm, my understanding was that the .pyc files have just an influence on loading times, not on run-times of python programs. So I assume for soemthing like 'openstack --help' it's significant, while something that runs longer it may be less so.
But why do we have to ship .pyc files as part of our binary rpms? They waste disk space and bandwidth for our mirrors and users.
I sometimes hear "disk space is cheap", but trying to do a rather small installation with python-packages is difficult atm. E.g. just adding sal-minion to a small installed system results in several dozend MB just for the .pyc files.
They could be created in a %post or %posttrans hook when installing the rpm (or do they need special build deps?) It might even be, that compiling them on the destination is faster than transferring and unpacking the LZMA compressed version.
Frankly speaking, they could be provided in a separate package, if really needed. I would not generate them in the packages. But "I am not a Python expert, just a user" :), so maybe there is a significant reason to have them always available? Just to have shorter startup-time of Python-programs doesn't sound like a valid reason to have both .py and .pyc. On the other hand, why not remove the .py files and just keep the .pyc? The .py files could be still in the .src-rpms, for those who need/want them. That would still give one the advantages of the .pyc, without wasting space. ciao, Stefan -- Stefan Behlert, SUSE LINUX Maxfeldstr. 5, D-90409 Nuernberg, Germany Phone +49-911-74053-173 SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg) -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org