Debian has two versions of Python. Debian's Python 3.x executable name is python3, so `/usr/bin/env python` gets me Python 2.x. I think this is a great example of this question.
My previous rough sketch hand-waved over a complicated part, which is how to figure out the python binary path. Even if Python provides a trivial way to get the interpreter's path, things like symlinks can complicate that. For example, it might return /usr/bin/python2.7 when the user wants /usr/bin/python, or vice versa, depending on what exactly they are trying to accomplish. If any feature to solve this is going to exist, a non-default option is probably the best. For example, something like this for me: python3 waf configure --python=/usr/bin/python3 python3 waf build python3 waf install That would avoid the big (but trivial) patch I have in the Debian package to replace all the shebang lines. As new utilities are added, I wouldn't have to catch them and update the patch. That'd be an improvement, but to be honest, it's not a huge problem. On 01/07/2018 04:59 PM, Gary E. Miller via devel wrote: > Gentoo > has a tool called eselect. With it I can select what version of python > to use as system default from the command line. For my own curiosity, does eselect manipulate a /usr/bin/python symlink? -- Richard
signature.asc
Description: OpenPGP digital signature
_______________________________________________ devel mailing list devel@ntpsec.org http://lists.ntpsec.org/mailman/listinfo/devel