[Distutils] Patch to have distutils generate PYC *and* PYO files

Thomas Heller thomas.heller@ion-tof.com
Fri Sep 22 10:31:01 2000

> Maybe it's time to reconsider when we do byte-compilation.  The reasons
> for doing it at install time were:
>   * so the .py filename encoded in the .pyc file is correct
>   * to make built distributions smaller
> But the former is a red herring, since it turns out that we do
> pseudo-installations to temporary directories to create RPM and wininst
> built distributions, and will probably do the same for other smart bdist
> formats.
Not exactly true:
wininst switches off compilation in the install_lib command
which runs at build (pseudo installation) time:
        install_lib.compile = 0
        install_lib.optimize = 0
and compiles at install time both to pyc and pyo, which is correct IMO,
because we now have the right filenames in the compiled files.

Of course, since the windows installer embeds python, I have a backdoor
into the interpreter :-)