Michael P. Reilly firstname.lastname@example.org said:
I disagree. I see no reason to double the size of the distribution by shipping redundent files (on average, a .pyc is 78.786% of a .py, based on the Python 1.5.1 distribution; .pyo is 88.148%).
Andrew Dalke, on 29 March 1999, writes:
"build" directory. The .pyo and .pyc files are generated in the build directory on the local (downloaded) machine.
Greg Ward writes:
Well, actually, you're both right. Compiling .py files at build time will not affect *source* distributions, which is what Andrew is talking
And I say Michael's figures are conservative; most .pyc files are larger than the .py files. (I've attached a simple script to compare the sizes; Unix only.)
Does this seem like a problem to anyone else? I still want to keep installation as simple as possible -- and, more importantly, be able to trivially determine the set of files that will be installed -- but if increasing the size of built distributions really bothers you, speak up!
I think a lot of people will be bothered by the increased size, whether or not we are. People with poor connectivity and archive maintainers will want reduced size. Removing the .pyc and .pyo files will help make packages less tied to Python versions as well; these files have often been obsoleted by changes between Python versions. It's simple enough to generate them during installation when we're able to run at that time. For RPMs this should be fine; I'm not sure about other package systems. For some, it may make sense to build them in the installation locations and then chmod them; this may be the case for the Solaris PKG system. (Barry, are you following this?)
-- Fred L. Drake, Jr. email@example.com Corporation for National Research Initiatives