Gentoo Archives: gentoo-dev

From: William Hubbs <williamh@g.o>
To: gentoo-dev@l.g.o
Cc: floppym@g.o, chewi@g.o
Subject: Re: [gentoo-dev] [PATCH 1/3] dev-util/meson: install meson-array script
Date: Thu, 17 Dec 2020 20:38:50
Message-Id: X9vB0zLWPpHZiHXt@linux1.home
In Reply to: Re: [gentoo-dev] [PATCH 1/3] dev-util/meson: install meson-array script by Mike Gilbert
1 On Sat, Dec 12, 2020 at 09:22:06PM -0500, Mike Gilbert wrote:
2 > On Sat, Dec 12, 2020 at 9:09 PM William Hubbs <williamh@g.o> wrote:
3 > >
4 > > On Sat, Dec 12, 2020 at 04:25:48PM -0500, Mike Gilbert wrote:
5 > > > On Sat, Dec 12, 2020 at 3:48 PM William Hubbs <williamh@g.o> wrote:
6 > > > > If both /usr/bin/python and /usr/bin/python3 are going away, the best
7 > > > > choice would be to add functionality to python-exec or eselect python to tell us
8 > > > > the path to the default python interpretor. Once we know that we call it
9 > > > > directly.
10 > > >
11 > > > I don't think they are "going away". There is a USE flag on
12 > > > dev-lang/python-exec that makes them optional, and I think it will be
13 > > > forcibly enabled for the foreseeable future.
14 > > >
15 > > > > Please do not apply this patch to meson; I think we can figure something
16 > > > > out that is better.
17 > > >
18 > > > I think installing a small script to help translate arguments from one
19 > > > format to another is a reasonable solution.
20 > >
21 > > I think we should look at the eclass to see if we can provide functions
22 > > that can be used by consumers to handle this.
23 >
24 > I don't really understand what you mean by this. I am converting one
25 > internal bash function into an external script so that its python
26 > dependencies can be better defined and managed.
27
28 What I mean is, ebuilds should not be calling _meson_env_array at all
29 since it is defined and documented as an eclass internal function.
30
31 I would like to know more about what the gallium-nine-standalone ebuild
32 is doing and why it needs to call a meson.eclass internal function.
33
34 On the other hand, if _meson_env_array is meant to be called by ebuilds,
35 we need to rename it and improve the documentation for it in the eclass.
36
37 > > Also, I don't think your script will run if native-symlinks is disabled since in
38 > > that setting /usr/bin/python would not exist.
39 >
40 > python_doscript updates the shebang before installing the script.
41
42 Ok, I didn't know python_doscript does this, but couldn't we just
43 change line 129 in the eclass to "python3 -c ..."?
44
45 > > I question the value of the native-symlinks use flag on python-exec
46 > > unless there is a way to query the path of the default python
47 > > interpretor.
48 >
49 > Regardless, I don't see how that makes my solution a bad thing. It
50 > ensures that the code will be executed by a known/support/tested
51 > version of python.
52 >
53
54 I'm not sure how useful the script is as a command, so I don't think it
55 should be installed that way, but I do want to hear more about this,
56 both from you and chewi. :-)
57
58 William

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies