Gentoo Archives: gentoo-python

From: Mike Gilbert <floppym@g.o>
To: "Michał Górny" <mgorny@g.o>
Cc: gentoo-python <gentoo-python@l.g.o>, Gentoo Python Project <python@g.o>, dolsen@g.o
Subject: [gentoo-python] Re: Minimal technical demo for alternate bindir scheme
Date: Sat, 07 Sep 2013 16:00:14
Message-Id: CAJ0EP42dPXb+vPCDufwsU8CaOMxS54RA=UbbRwEp5NzY90JjSg@mail.gmail.com
In Reply to: [gentoo-python] Minimal technical demo for alternate bindir scheme by "Michał Górny"
1 On Sat, Sep 7, 2013 at 4:44 AM, Michał Górny <mgorny@g.o> wrote:
2 > Hello, all.
3 >
4 > I've wrapped up a first patch to demonstrate the concept of keeping
5 > Python scripts outta bindir.
6 >
7 > Steps to do:
8 >
9 > 1. create /etc/env.d/NNpythonpath like:
10 >
11 > PATH="/usr/lib64/python3.3/bin:/usr/lib64/python3.2/bin:/usr/lib64/python2.7/bin:/usr/lib64/python2.6/bin:/usr/lib64/pypy2.0/bin"
12 >
13 > (this will be most likely done by eselect-python)
14 >
15 > 2. env-update, source /etc/profile
16 >
17 > 3. apply the attached patch to the eclasses
18 >
19 > TADAAM!
20 >
21 > Expect new levels of screwup. Things that definitely don't work:
22 >
23 > 1. python_scriptinto() since we install all the scripts to dedicated
24 > location. I have no idea how to support it without forking paths like
25 > crazy.
26 >
27 > 2. things that rely on /usr/bin path. We will need new wrappers for
28 > that. If we really want that.
29 >
30 > 3. systems with screwed up $PATH. That is, you won't find Python stuff
31 > if you don't have proper path in PATH :).
32 >
33 > 4. python_wrapper_setup() enforces only current impl in PATH. Remaining
34 > impls need to be provided by caller env. If they aren't, some deps with
35 > mis-matched impls may not work.
36 >
37 > Enjoy, test and comment.
38 >
39
40 I like it on the surface, although I am a little concerned about
41 relying on that PATH setting. I'm sure people will find ways to screw
42 that up (like running chroot without sourcing /etc/profile).
43
44 I'll give it a shot here.

Replies