Gentoo Archives: gentoo-python

From: "Michał Górny" <mgorny@g.o>
To: gentoo-python@l.g.o
Subject: [gentoo-python] [PATCH] Eclass support for pypy-bin
Date: Mon, 22 Jul 2013 09:49:17
Message-Id: 20130722114917.4f8d4b9a@gentoo.org
1 Hello,
2
3 Since we're practically ready to start building pypy-bin packages, we
4 should address the compatibility within eclasses.
5
6 I'm sending six patches that fix all the Python eclasses (-r1, -ng
7 and the old one) to support pypy-bin. It should be noted that some
8 ebuilds which use ugly unsupported hackery (sys-apps/portage) will
9 still need to be updated by hand.
10
11 And all users who had pypy enabled before will need to rebuild all
12 the packages that depend on it, or hack their *DEPEND in vardb to allow
13 pypy-bin.
14
15 Patches will be sent as replies to this mail. Short summary follows.
16
17
18 python-any-r1.eclass:
19
20 1) use PYTHON_PKG_DEP for generating deps
21
22 I must have missed it when converting the other two eclasses.
23
24 2) replace has_version with simple '-x' check
25
26 That makes it simpler, faster and compatible with PYTHON_PKG_DEP
27 becoming any-of dep.
28
29
30 python-utils-r1.eclass:
31
32 3) simple reordering of PYTHON_PKG_DEP
33
34 4) generate any-of dep for || ( pypy pypy-bin )
35
36 Which basically makes all the eclasses compatible.
37
38
39 python-distutils-ng.eclass:
40
41 5) add any-of dep to *DEPEND.
42
43 Although it's doomed, it's fairly easy to add the support to it.
44
45
46 python.eclass:
47
48 6) hack python_get_implementation_package() for pypy-bin
49
50 It's not used anywhere but in the eclass itself. It's used solely for
51 passing into 'has_version' to do integrity checks or PYTHON_USE_WITH
52 checks in ancient EAPIs.
53
54 I don't think it's worth to address this deprecated eclass thoroughly.
55 Therefore, the patch just uses has_version to see if pypy-bin is
56 installed, and outputs 'pypy-bin' or 'pypy' atom appropriately.
57
58 Also, I don't see any place outputting pypy dep. I guess it just
59 doesn't do it.
60
61 --
62 Best regards,
63 Michał Górny

Attachments

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

Replies