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

2013-03-30 Thread Vinay Sajip
Nick Coghlan ncoghlan at gmail.com writes: * ship a tool for creating an executable pyz or pyzw file from a directory of pure-Python files This could be a variant of my pyzzer.py tool: https://gist.github.com/vsajip/5276787 It doesn't print warnings for extensions or byte-compile anything,

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

2013-03-30 Thread Brett Cannon
On Mar 29, 2013 4:12 PM, Nick Coghlan ncogh...@gmail.com wrote: On Fri, Mar 29, 2013 at 8:43 AM, Daniel Holth dho...@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

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

2013-03-29 Thread Nick Coghlan
On Fri, Mar 29, 2013 at 8:43 AM, Daniel Holth dho...@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

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

2013-03-29 Thread Daniel Holth
Would pyzw be much better than reading the shebang line for Windows? On Mar 29, 2013 4:11 PM, Nick Coghlan ncogh...@gmail.com wrote: On Fri, Mar 29, 2013 at 8:43 AM, Daniel Holth dho...@gmail.com wrote: WinZip will ignore anything in the front of the file since the zip directory doesn't

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

2013-03-28 Thread Paul Moore
On 28 March 2013 11:40, Philippe Ombredanne pombreda...@nexb.com wrote: This is not a zip, not an egg, not a wheel but some egg-in-py, zip-in-py or wheel-in-py and is similar to a shar shell archive. My point was that on the one hand, I like the fact that everything is self contained in one

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

2013-03-28 Thread Daniel Holth
If it was distributed as such virtualenv could read blobs out of its own zip file, use the get_data() API to read non-module, or add subdirectories inside its zip file to sys.path On Thu, Mar 28, 2013 at 8:32 AM, Paul Moore p.f.mo...@gmail.com wrote: On 28 March 2013 11:40, Philippe Ombredanne

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

2013-03-28 Thread Paul Moore
On 28 March 2013 12:26, Daniel Holth dho...@gmail.com wrote: The launcher will be updated to understand this format and Python will register this filename association when it is installed. The launcher should need no changes. The Python msi installer would need a change to register the new

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

2013-03-28 Thread Daniel Holth
On Thu, Mar 28, 2013 at 8:43 AM, Paul Moore p.f.mo...@gmail.com wrote: On 28 March 2013 12:26, Daniel Holth dho...@gmail.com wrote: The launcher will be updated to understand this format and Python will register this filename association when it is installed. The launcher should need no

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

2013-03-28 Thread Paul Moore
On 28 March 2013 12:45, Daniel Holth dho...@gmail.com wrote: On Thu, Mar 28, 2013 at 8:43 AM, Paul Moore p.f.mo...@gmail.com wrote: On 28 March 2013 12:26, Daniel Holth dho...@gmail.com wrote: The launcher will be updated to understand this format and Python will register this filename

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

2013-03-28 Thread Vinay Sajip
From: Paul Moore p.f.mo...@gmail.com Yes, my point was that Vinay's usage could be covered by distributing distil as a zip file. All it is doing is decoding it's blob of data (which is an encoded zip file) and then adding the resulting zip to sys.path. [snip] I hope that embedded binary

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

2013-03-28 Thread Daniel Holth
On Thu, Mar 28, 2013 at 9:11 AM, Vinay Sajip vinay_sa...@yahoo.co.uk wrote: From: Paul Moore p.f.mo...@gmail.com Yes, my point was that Vinay's usage could be covered by distributing distil as a zip file. All it is doing is decoding it's blob of data (which is an encoded zip file) and then

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

2013-03-28 Thread Paul Moore
On 28 March 2013 13:11, Vinay Sajip vinay_sa...@yahoo.co.uk wrote: I don't know if it's that important to distinguish between the two. I found the approach I'm using with distil to be a tad more flexible in my case. A runnable zip has the advantage that it's harder to tinker with, but with

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

2013-03-28 Thread Vinay Sajip
From: Philippe Ombredanne pombreda...@nexb.com On the other hand, I find it somewhat discomforting as an emerging best way to package and distribute self-contained bootstrap scripts. But what is the root cause of that discomfort? The distil approach is slightly more discoverable than a

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

2013-03-28 Thread Vinay Sajip
From: Daniel Holth dho...@gmail.com Also if you are looking for tweakability you can run a directory with the same contents of the .zip exactly the same as if it was a zip. Sure, but my smoke testing involved copying the tweaked distil.py to a network share, then running that file from other

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

2013-03-28 Thread Philippe Ombredanne
On Thu, Mar 28, 2013 at 2:33 PM, Vinay Sajip vinay_sa...@yahoo.co.uk wrote: From: Philippe Ombredanne pombreda...@nexb.com On the other hand, I find it somewhat discomforting as an emerging best way to package and distribute self-contained bootstrap scripts. Virtualenv does it, distil is

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

2013-03-28 Thread Daniel Holth
Not really trying to tell Vinay to rewrite his script, but IMHO if you expect it unzip is a lot easier than 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

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

2013-03-28 Thread Vinay Sajip
Philippe Ombredanne pombredanne at nexb.com writes: Conceptually I find these no different from setup.py scripts, and these have been mostly normalized (or at the minimum have a conventional name and a conventional if not specified interface.) Except that you programmatically interface (to

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

2013-03-28 Thread Steve Dower
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

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

2013-03-28 Thread PJ Eby
On Thu, Mar 28, 2013 at 1:54 PM, Steve Dower steve.do...@microsoft.com wrote: 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. Actually, the opposite is true, at least for 3rd-party

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

2013-03-28 Thread Daniel Holth
On Thu, Mar 28, 2013 at 3:49 PM, PJ Eby p...@telecommunity.com wrote: On Thu, Mar 28, 2013 at 1:54 PM, Steve Dower steve.do...@microsoft.com wrote: 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

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

2013-03-28 Thread Steve Dower
Daniel Holth wrote: On Thu, Mar 28, 2013 at 3:49 PM, PJ Eby p...@telecommunity.com wrote: On Thu, Mar 28, 2013 at 1:54 PM, Steve Dower steve.do...@microsoft.com wrote: And, I'm almost certain that most if not all existing ZIP tools on Windows will fail to open files with a shebang, since

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

2013-03-28 Thread Daniel Holth
On Thu, Mar 28, 2013 at 6:19 PM, Steve Dower steve.do...@microsoft.com wrote: Daniel Holth wrote: On Thu, Mar 28, 2013 at 3:49 PM, PJ Eby p...@telecommunity.com wrote: On Thu, Mar 28, 2013 at 1:54 PM, Steve Dower steve.do...@microsoft.com wrote: And, I'm almost certain that most if not all