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