On Sat, Dec 12, 2020 at 09:22:06PM -0500, Mike Gilbert wrote: > On Sat, Dec 12, 2020 at 9:09 PM William Hubbs <willi...@gentoo.org> wrote: > > > > On Sat, Dec 12, 2020 at 04:25:48PM -0500, Mike Gilbert wrote: > > > On Sat, Dec 12, 2020 at 3:48 PM William Hubbs <willi...@gentoo.org> wrote: > > > > If both /usr/bin/python and /usr/bin/python3 are going away, the best > > > > choice would be to add functionality to python-exec or eselect python > > > > to tell us > > > > the path to the default python interpretor. Once we know that we call it > > > > directly. > > > > > > I don't think they are "going away". There is a USE flag on > > > dev-lang/python-exec that makes them optional, and I think it will be > > > forcibly enabled for the foreseeable future. > > > > > > > Please do not apply this patch to meson; I think we can figure something > > > > out that is better. > > > > > > I think installing a small script to help translate arguments from one > > > format to another is a reasonable solution. > > > > I think we should look at the eclass to see if we can provide functions > > that can be used by consumers to handle this. > > I don't really understand what you mean by this. I am converting one > internal bash function into an external script so that its python > dependencies can be better defined and managed.
What I mean is, ebuilds should not be calling _meson_env_array at all since it is defined and documented as an eclass internal function. I would like to know more about what the gallium-nine-standalone ebuild is doing and why it needs to call a meson.eclass internal function. On the other hand, if _meson_env_array is meant to be called by ebuilds, we need to rename it and improve the documentation for it in the eclass. > > Also, I don't think your script will run if native-symlinks is disabled > > since in > > that setting /usr/bin/python would not exist. > > python_doscript updates the shebang before installing the script. Ok, I didn't know python_doscript does this, but couldn't we just change line 129 in the eclass to "python3 -c ..."? > > I question the value of the native-symlinks use flag on python-exec > > unless there is a way to query the path of the default python > > interpretor. > > Regardless, I don't see how that makes my solution a bad thing. It > ensures that the code will be executed by a known/support/tested > version of python. > I'm not sure how useful the script is as a command, so I don't think it should be installed that way, but I do want to hear more about this, both from you and chewi. :-) William
signature.asc
Description: PGP signature