Gentoo Archives: gentoo-portage-dev

From: Mike Gilbert <floppym@g.o>
To: gentoo-portage-dev@l.g.o
Subject: Re: [gentoo-portage-dev] [PATCH] Use env to find python
Date: Tue, 16 Jun 2020 19:19:52
Message-Id: CAJ0EP41psU41rj8jCLvHeje0qHgB4V4O=6Q1Vu=GVrOLU-fvZg@mail.gmail.com
In Reply to: Re: [gentoo-portage-dev] [PATCH] Use env to find python by Zac Medico
1 On Tue, Jun 16, 2020 at 1:55 PM Zac Medico <zmedico@g.o> wrote:
2 >
3 > On 6/16/20 10:46 AM, Mike Gilbert wrote:
4 > > On Tue, Jun 16, 2020 at 1:45 PM Mike Gilbert <floppym@g.o> wrote:
5 > >>
6 > >> On Mon, Jun 15, 2020 at 9:39 AM Sid Spry <sid@××××.us> wrote:
7 > >>>
8 > >>> On Mon, Jun 15, 2020, at 2:36 AM, Ulrich Mueller wrote:
9 > >>>> But we know that it is in /usr/bin, so why add yet another indirection?
10 > >>>>
11 > >>>> Attachments:
12 > >>>> * signature.asc
13 > >>>
14 > >>> Ah, sorry -- I forgot to note this here. If you wish to support prefix it is possible it may not be in /usr/bin. Granted I am not sure if the prefix stage3 I was using is old enough to be broken in some way, but adding this would prevent future breakage.
15 > >>
16 > >> The portage ebuild and the python distutils module already take care
17 > >> of updating shebangs at install time.
18 > >
19 > > I suppose your patch might be useful if you are trying to run portage
20 > > from a git checkout on a prefix system.
21 > >
22 >
23 > So, given that the ebuild updates shebangs automatically, should't we
24 > optimize the default shebangs to be as flexible as possible?
25
26 Yes, that makes sense.
27
28 However, we should test to make sure that distutils is smart enough to
29 parse that "/usr/bin/env -S python" string and replace it with
30 version-specific python shebang.

Replies

Subject Author
Re: [gentoo-portage-dev] [PATCH] Use env to find python "Michał Górny" <mgorny@g.o>