Gentoo Archives: gentoo-python

From: "Michał Górny" <mgorny@g.o>
To: Mike Gilbert <floppym@g.o>
Cc: gentoo-python@l.g.o
Subject: Re: [gentoo-python] Re: [PATCH eselect-python 1/2] Store per-version interpreter preference in a file as well.
Date: Thu, 01 Nov 2012 21:26:33
Message-Id: 20121101222719.2717ff05@pomiocik.lan
In Reply to: [gentoo-python] Re: [PATCH eselect-python 1/2] Store per-version interpreter preference in a file as well. by Mike Gilbert
1 On Thu, 1 Nov 2012 14:48:55 -0400
2 Mike Gilbert <floppym@g.o> wrote:
3
4 > On Thu, Nov 1, 2012 at 11:44 AM, Mike Gilbert <floppymaster@×××××.com> wrote:
5 > > On Thu, Nov 1, 2012 at 7:54 AM, Michał Górny <mgorny@g.o> wrote:
6 > >> The idea is very simple: /etc/env.d/python/python[23] with a one-line
7 > >> value similar to the main interpreter /config file.
8 > >>
9 > >> That should be simpler & more reliable than reading a symlink. And at
10 > >> some point we can replace the symlink with an $EPYTHON-aware wrapper
11 > >> as well.
12 > >
13 > > I don't understand the point of this. Do we have some need to enable
14 > > EPYTHON usages for scripts that have a python2 or python3 shebang?
15 > >
16 > > I also don't understand how a text file is more reliable than a
17 > > symlink; they are basically the same thing, but the symlink has a
18 > > different file mode.
19
20 Ah, and I'd forget. I have the following dream:
21
22 /etc/env.d/python/python2
23 /etc/env.d/python/python3
24 /etc/env.d/python/config -> python2
25
26 So, python{2,3} keep the per-version interpreters, and config is just
27 a symlink to one of them. Two bird with one stone -- readlink to get
28 which group is enabled, cat to get the exact interpreter. I'm proud
29 of myself!
30
31 --
32 Best regards,
33 Michał Górny

Attachments

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

Replies