Proper shebang for python3
Peter J. Holzer
hjp-python at hjp.at
Sat Jul 20 15:56:55 EDT 2019
On 2019-07-20 14:11:44 -0500, Tim Daneliuk wrote:
> So, no, do NOT encode the hard location - ever. Always use env to
> discover the one that the user has specified. The only exception is
> /bin/sh which - for a variety of reasons - can reliably counted upon.
>
> We don't need to bikeshed this. All we need is people who disagree
> with this view to spend a year in software packaging, operations,
> deployment and DevOps ... then get back to us...
After 25 years in software packaging, operations, deployment and DevOps
I disagree: A program should not behave differently because of a
different path, #!/usr/bin/env is a total no-no.
There is a nice way to achieve this: Just use the interpreter of the
virtual environment in the shebang.
(That requires rewriting the shebang during installation, but that's a
minor inconvenience)
hp
--
_ | Peter J. Holzer | we build much bigger, better disasters now
|_|_) | | because we have much more sophisticated
| | | hjp at hjp.at | management tools.
__/ | http://www.hjp.at/ | -- Ross Anderson <https://www.edge.org/>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-list/attachments/20190720/5a43ece1/attachment.sig>
More information about the Python-list
mailing list