Gentoo Archives: gentoo-python

From: "Michał Górny" <mgorny@g.o>
To: gentoo-python@l.g.o
Subject: [gentoo-python] Alternate solution for 'python', 'python2' and 'pkg-config python' in ebuilds
Date: Fri, 29 Mar 2013 20:02:49
Message-Id: 20130329205702.03f29327@pomiocik.lan
1 Hello,
2
3 Currently, we're using python-wrapper to properly respect EPYTHON
4 in ebuilds. This is a bit hacky since every call to Python has to go
5 through wrapper which chooses the same implementation over and over
6 again.
7
8 There was a request to handle 'pkg-config --cflags --libs python'
9 through eselect-python. Of course, we can't wrap pkg-config like we do
10 Python (well, we can but...).
11
12
13 The alternate solution is something similar to what vala people do. It
14 addresses all packages calling 'python', 'python2', 'python3'
15 or 'pkg-config python' and using any of the -r1 eclasses.
16
17 The idea is to create a ${T}/bin and ${T}/pkgconfig directories.
18 In the former, place 'python' and either 'python2' or 'python3'
19 symlinks proper to current ${EPYTHON}. In the latter, 'python.pc'
20 and possibly 'python2.pc' or 'python3.pc'. Add the former to ${PATH},
21 the latter to ${PKG_CONFIG_PATH}.
22
23 In -single-r1 and -any-r1 the directory creation and environment
24 manipulation would be done in pkg_setup(). In python-r1 it would have
25 to be done in python_export_best (with separate directory)
26 and python_foreach_impl.
27
28
29 Does this sound like a good solution? Should I run some tests?
30
31 --
32 Best regards,
33 Michał Górny

Attachments

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

Replies