Binary generation with distutils? (Freeze, py2exe, etc.)

Martin v. Löwis loewis at informatik.hu-berlin.de
Wed Mar 20 06:26:27 EST 2002


"Thomas Heller" <theller at python.net> writes:

> Do you think that PyImport_FrozenModule() should be extended to handle
> compressed byte codes? 

Yes, this is what I had in mind.

> Or should freeze simply append the compressed byte codes to the
> executable (as py2exe and installer do it) instead of compiling them
> with the C-compiler?

That can't work portably across compilers and operating systems.

> An interesting idea would be to additionally distribute Python and
> extension modules (on windows) not only as dlls, but also as static
> libraries. In this case only a linker would be needed, and you avoid
> the problems compiling all the sources...

If you use freeze, you will still need a compiler. But I agree that a
static library would be nice to have.

> Another possibility would be to use a program creating a standalone
> exe-file from exe and dlls. I have once tried such a program, it worked
> in simple cases, but not for Python. Then I wrote some code (in python)
> myself to do this, it is very tricky, but certainly possible.

This sounds platform-specific, so it is not very interesting to me.

Regards,
Martin



More information about the Python-list mailing list