Message358312
> I think supporting the shebang line in py.exe is a misfeature and
> would prefer we'd never done it (though it predates my involvement).
Do you mean all shebangs, including those with a native file path?
Or do you mean just virtual shebangs, and in particular those that search PATH via "/usr/bin/env"? It's not without controversy even in Unix. For example, see [1] and the rebuttal to it in the comments.
In the case of this issue, "env" is used to run a script in an active virtual environment. This doesn't rely on the user or system PATH, assuming the command can be found in the active scripts directory.
As an alternative to modifying the launcher, pip (via distlib) could be updated to transform "#!/usr/bin/env pythonX[.Y]" shebangs into "#!/usr/bin/env python" when installing scripts in Windows. pip and distlib are third-party tools, however, so that suggestion is beyond the scope of this issue tracker.
[1] https://jmmv.dev/2016/09/env-considered-harmful.html |
|
Date |
User |
Action |
Args |
2019-12-12 23:19:35 | eryksun | set | recipients:
+ eryksun, paul.moore, tim.golden, zach.ware, steve.dower, Alexandros Karypidis |
2019-12-12 23:19:35 | eryksun | set | messageid: <1576192775.44.0.00929237557609.issue38999@roundup.psfhosted.org> |
2019-12-12 23:19:35 | eryksun | link | issue38999 messages |
2019-12-12 23:19:34 | eryksun | create | |
|