Gentoo Archives: gentoo-dev

From: Krzysztof Pawlik <nelchael@g.o>
To: gentoo-dev@l.g.o
Cc: justin <jlec@g.o>
Subject: Re: [gentoo-dev] New eclass for Python
Date: Mon, 26 Mar 2012 16:24:50
Message-Id: 4F709804.8060607@gentoo.org
In Reply to: Re: [gentoo-dev] New eclass for Python by Krzysztof Pawlik
1 On 26/03/12 18:11, Krzysztof Pawlik wrote:
2 > On 26/03/12 09:20, justin wrote:
3 >> On 25/03/12 20:56, Krzysztof Pawlik wrote:
4 >>> On 28/02/12 22:13, Krzysztof Pawlik wrote:
5 >>>> If there are no objections then during the weekend (March 3, 4) I will add this
6 >>>> to portage (after finishing remaining TODO items, PyPy requires 4G of RAM(!!)).
7 >>>
8 >>> Hello,
9 >>>
10 >>> Slightly late due to Real Life™ but finally it's in the main tree :)
11 >>>
12 >>> (and yes - I've tested it with pypy - works as expected :)
13 >>>
14 >>
15 >> Hi,
16 >>
17 >> is there any documentation beside the man page somewhere?
18 >
19 > No.
20 >
21 >> I tried to port some ebuilds but as soon I set
22 >>
23 >> PYTHON_COMPAT="python2_7 python2_6 python2_5 pypy1_8"
24 >>
25 >> inherit python-distutils-ng
26 >>
27 >> I get
28 >>
29 >> REQUIRED_USE: USE flag 'python_targets_python3_1' is not in IUSE
30 >>
31 >> Did I do something wrong, or is there something not straight in the eclass?
32 >
33 > Can you send me the whole ebuild off-list?
34 >
35 > There are two ebuilds using the eclass that I've used as tests:
36 > http://git.overlays.gentoo.org/gitweb/?p=dev/nelchael.git;a=tree;f=dev-python;h=f1a8e00e3e6df33806d8972c8898f1187163bd3d;hb=HEAD
37
38 Ok, found a bug: REQUIRED_USE can't contain elements not in USE, so if you
39 excluded python3_1 from PYTHON_COMPAT it didn't appear in IUSE too ->
40 REQUIRED_USE contained invalid value. Fixed by below patch:
41
42 nelchael@s-lappy ~/.../gentoo-x86/eclass$ cvs diff
43 Index: python-distutils-ng.eclass
44 ===================================================================
45 RCS file: /var/cvsroot/gentoo-x86/eclass/python-distutils-ng.eclass,v
46 retrieving revision 1.2
47 diff -u -r1.2 python-distutils-ng.eclass
48 --- python-distutils-ng.eclass 26 Mar 2012 06:12:53 -0000 1.2
49 +++ python-distutils-ng.eclass 26 Mar 2012 16:20:52 -0000
50 @@ -105,11 +105,11 @@
51 esac
52 }
53
54 -required_use_str=" || (
55 - python_targets_python2_5 python_targets_python2_6 python_targets_python2_7
56 - python_targets_python3_1 python_targets_python3_2
57 - python_targets_jython2_5
58 - python_targets_pypy1_7 python_targets_pypy1_8 )"
59 +required_use_str=""
60 +for impl in ${PYTHON_COMPAT}; do
61 + required_use_str="${required_use_str} python_targets_${impl}"
62 +done
63 +required_use_str=" || ( ${required_use_str} )"
64 if [[ "${PYTHON_OPTIONAL}" = "yes" ]]; then
65 IUSE+="python"
66 REQUIRED_USE+=" python? ( ${required_use_str} )"
67
68
69 --
70 Krzysztof Pawlik <nelchael at gentoo.org> key id: 0xF6A80E46
71 desktop-misc, java, vim, kernel, python, apache...

Attachments

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

Replies

Subject Author
Re: [gentoo-dev] New eclass for Python Corentin Chary <corentin.chary@×××××.com>