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 20:59:08
Message-Id: 20121101215948.36df2b16@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'm mostly thinking of a future potential. Or maybe just I dislike that
17 partially we're using wrappers, and partially symlinks.
18
19 > > I also don't understand how a text file is more reliable than a
20 > > symlink; they are basically the same thing, but the symlink has a
21 > > different file mode.
22
23 They have a different goal, I believe. The goal of a symlink is to tie
24 one path onto another; the goal of a file is to store data. I'd say
25 that symlink is valid as long as it points to the correct path, one way
26 or the other.
27
28 But well, it's more like 'we are keeping python in one place, but
29 python2/3 in another'. python-exec would also become simpler if one
30 function would be needed to get both kinds of implementations rather
31 than two different approaches.
32
33 Last but probably least, POSIX doesn't list 'readlink' utility. Not
34 sure how various Prefixes (interix?) handle that but I really dislike
35 the idea of storing data in symlinks.
36
37 --
38 Best regards,
39 Michał Górny

Attachments

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