[Distutils] Self-contained boostrap scripts [was: Re: A new, experimental packaging tool: distil]
Daniel Holth
dholth at gmail.com
Thu Mar 28 13:36:13 CET 2013
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.moore at gmail.com> wrote:
> On 28 March 2013 11:40, Philippe Ombredanne <pombredanne at 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 single .py file that you can execute right away.
>> On the other hand, I find it somewhat discomforting as an emerging
>> best way to package and distribute self-contained bootstrap scripts.
>> Yet I cannot think of a better way atm: for instance splitting things
>> in non-encoded non-binary plain strings would be quite weird too.
>
> 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.
>
> The virtualenv situation is different, as there we are trying to
> ensure that we remain single-file while embedding things that are
> *not* modules to add to sys.path. And we don't want to download our
> dependencies because we need to be able to run with no internet
> connection. But you are right, the embedded script approach is not
> ideal.
>
> I hope that "embedded binary blobs" does not become a common approach.
> I'd much rather that "runnable zip files" became the norm. It's
> certainly possible now, but I don't think it's well enough known (and
> there are administrative issues like the file extension question on
> Windows that make it more awkward than it should be). Hence my
> comments, trying to raise awareness a bit.
>
> Thanks for the feedback, and in particular the reminder that
> virtualenv could do with looking at this... I've added a virtualenv
> issue to remind me to think some more about it.
> Paul
> _______________________________________________
> Distutils-SIG maillist - Distutils-SIG at python.org
> http://mail.python.org/mailman/listinfo/distutils-sig
More information about the Distutils-SIG
mailing list