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

Brett Cannon brett at yvrsfo.ca
Sat Mar 30 16:39:23 CET 2013


On Mar 29, 2013 4:12 PM, "Nick Coghlan" <ncoghlan at gmail.com> wrote:
>
> On Fri, Mar 29, 2013 at 8:43 AM, Daniel Holth <dholth at gmail.com> wrote:
> > WinZip will ignore anything in the front of the file since the zip
> > directory doesn't reference it. The #! shebang is for Unix, would
> > point to the correct Python, and the +x flag would make it executable.
> > The mini PEP is for the .pyz registration and for publicity.
>
> The two big reasons almost nobody knows about the executable zip files
> and directories is we forgot to mention it in the original 2.6 What's
> New (it's there now, but was added much later), and it was done in a
> tracker issue [1] (with Guido participating) rather than as a PEP.
>
> A new PEP to:
>
> * register the .pyz and .pyzw extensions in the 3.4 Windows installer
> * ship a tool for creating an executable pyz or pyzw file from a
> directory of pure-Python files (warning if any extension files are
> noticed, and with the option of bytecode precompilation)
>
> Would be great.

And that pre-compilation could even do it for multiple versions of Python
thanks to __pycache__. I've actually contemplated creating a distutils
command to do this exact thing.

Been thinking about this since 2010:
http://sayspy.blogspot.ca/2010/03/various-ways-of-distributing-python.html

>
> Cheers,
> Nick.
>
> [1] http://bugs.python.org/issue1739468
>
> --
> Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia
> _______________________________________________
> Distutils-SIG maillist  -  Distutils-SIG at python.org
> http://mail.python.org/mailman/listinfo/distutils-sig
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20130330/2b4337d0/attachment.html>


More information about the Distutils-SIG mailing list