zipapp: could have a shebang
https://docs.python.org/3/library/zipapp.html#zipapp.create_archive
in particular the interpreter argument -- should we set something for it?
that way someone could do:
curl -o virtualenv.pyz
chmod +x virtualenv.pyz
./virtualenv.pyz venv
I'm reluctant on this; this would encourage running things like that, but that can only work on UNIX; I kinda prefer the explicit over implicit interpreter here? Any strong arguments against?
Edit: What would be a sane value for that? Just python?
yeah I guess that's a good point, it's hard to pick a good interpreter here -- maybe python3?
or just scrap this :man_shrugging:
Doesn't the py launcher for Windows know how to read pyz shebang also?
Yeah, it knows. But what should be the shebang value that's sane on all platforms? Feels like that's more useful when you know your target python, e.g. you control where you deploy the zipapp.
Just python?
Should be, yea. For the versioned URLs, we could add the shebangs with per-interpreter names (python3.8). I think py.exe is smart enough to translate those, even for pyz files -- but it wouldn't hurt to make sure before we actually change stuff. :)
I also think we can change names on the get-virtualenv repository if we want to, given that it's still pretty early -- in case we want to have a virtualenv-3.8.pyz. I don't think we do though. :)
I'll mark this as something we should do but not blocker for 20.0.0, which is still planned for Monday (we have one blocker issue just for that).
Seems no longer an issue as no one reported it in 3 years.