[Distutils] generating pyc and pyo files
Michael P. Reilly
arcege@shore.net
Tue, 30 Mar 1999 10:06:34 -0500 (EST)
> Michael P. Reilly <arcege@shore.net> 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.)
They aren't just conservative, they are downright misleading - I mixed
the ratios in the email, sorry. The 78.768% is supposed to be the size
of .py to .pyc and 88.148% is .py to .pyo, not the other way around.
These were averages based on the modules available thru sys.path at
home (318 .pyc files, 213 .pyo files); it only included values where
there were both a .py and .pyc or both .py/.pyo so the averages weren't
thrown off.
>
> -Fred
-Arcege
--
------------------------------------------------------------------------
| Michael P. Reilly, Release Engineer | Email: arcege@shore.net |
| Salem, Mass. USA 01970 | |
------------------------------------------------------------------------