Gentoo Archives: gentoo-python

From: "Michał Górny" <mgorny@g.o>
To: gentoo-python@l.g.o
Cc: python@g.o, dolsen@g.o
Subject: [gentoo-python] Minimal technical demo for alternate bindir scheme
Date: Sat, 07 Sep 2013 08:44:07
Message-Id: 20130907104419.6de8ecf2@gentoo.org
1 Hello, all.
2
3 I've wrapped up a first patch to demonstrate the concept of keeping
4 Python scripts outta bindir.
5
6 Steps to do:
7
8 1. create /etc/env.d/NNpythonpath like:
9
10 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"
11
12 (this will be most likely done by eselect-python)
13
14 2. env-update, source /etc/profile
15
16 3. apply the attached patch to the eclasses
17
18 TADAAM!
19
20 Expect new levels of screwup. Things that definitely don't work:
21
22 1. python_scriptinto() since we install all the scripts to dedicated
23 location. I have no idea how to support it without forking paths like
24 crazy.
25
26 2. things that rely on /usr/bin path. We will need new wrappers for
27 that. If we really want that.
28
29 3. systems with screwed up $PATH. That is, you won't find Python stuff
30 if you don't have proper path in PATH :).
31
32 4. python_wrapper_setup() enforces only current impl in PATH. Remaining
33 impls need to be provided by caller env. If they aren't, some deps with
34 mis-matched impls may not work.
35
36 Enjoy, test and comment.
37
38 --
39 Best regards,
40 Michał Górny

Attachments

File name MIME type
0001-Support-PYTHON_SCRIPTDIR-in-eclass.patch text/x-patch
signature.asc application/pgp-signature

Replies