[Distutils] Self-contained boostrap scripts [was: Re: A new, experimental packaging tool: distil]
p.f.moore at gmail.com
Thu Mar 28 14:05:00 CET 2013
On 28 March 2013 12:45, Daniel Holth <dholth at gmail.com> wrote:
> On Thu, Mar 28, 2013 at 8:43 AM, Paul Moore <p.f.moore at gmail.com> wrote:
>> On 28 March 2013 12:26, Daniel Holth <dholth at 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 extension, though.
>> And *creating* such zips is mildly annoying on Windows, due to a
>> general lack of tool support for manipulating binary files in text
>> Oh, and wouldn't "#!/usr/bin/env python(w)" be a better header? That
>> would work on Unix, and the launcher recognises that format.
>> But +1 on the idea in general.
> There is no 'cat header zip > newzip'?
There are multiple options. And text file vs binary file issues to cover.
CMD.EXE: copy /b header+zip newzip
Powershell: get-content header,zip -enc Byte | set-content newzip -enc Byte
Powershell: cmd /c copy /b header+zip newzip (because the previous
version is so ugly...)
Or write a Python script, which is what I did. Yes, I know :-(
More information about the Distutils-SIG