[Distutils] Self-contained boostrap scripts [was: Re: A new, experimental packaging tool: distil]

Steve Dower Steve.Dower at microsoft.com
Thu Mar 28 18:54:26 CET 2013

Daniel Holth <dholth <at> gmail.com> writes:

> file.write(module.random_attribute.decode('base64')). The runnable zip 
> feature is awesome, not well enough known, and totally worth promoting 
> over the shar pattern; with some minimal tooling you'd be good to go.

Runnable zips sound great - I certainly haven't come across them before (or if I have, I didn't see the potential at the time).

That said, from a Windows perspective, shebangs and mixed text/binary files worry me. The better approach on Windows would be to take a new extension (.pyz? .pyp[ackage]?) and associate that with the launcher. (File extensions on Windows are the moral equivalent of shebang lines.)

Changing .zip in any way will upset anyone who has a utility for opening ZIP files (i.e. everyone) and there's no way to launch files differently based on content without changing that association. And, I'm almost certain that most if not all existing ZIP tools on Windows will fail to open files with a shebang, since they've never had to deal with them.

I also think that a runnable zip may be a better package installation option than MSIs, but that's another issue :)


More information about the Distutils-SIG mailing list