[Python-Dev] Request for Pronouncement: PEP 441 - Improving Python ZIP Application Support
Barry Warsaw
barry at python.org
Tue Feb 24 21:32:46 CET 2015
On Feb 24, 2015, at 08:20 PM, Paul Moore wrote:
>(side note: --python/-p or --interpreter/-i?) and set the entry point,
Both virtualenv and (I think) pex use --python/-p so that seems to be the
overwhelming trend <wink>.
>To modify an archive could be done using
>
> python -m zipapp old.pyz new.pyz [-p interpreter]
>
>Default is to strip the shebang (no -p option). There's no option to
>omit the target and do an inplace update because I feel the default
>action (strip the shebang from the existing file with no backup) is
>too dangerous.
You have to be careful about the case where old.pyz == new.pyz (e.g. either
handling this case safely or complaining loudly) , but also you could handle
it by using a .tmp file and renaming. E.g. old.pyz -> old.pyz.bak and
old.pyz.tmp -> old.pyz.
>3. What to call the "show the shebang line" option
I don't know how useful this is, given that (on *nix at least) you can
effectively do the same with head(1).
Cheers,
-Barry
More information about the Python-Dev
mailing list