Gentoo Archives: gentoo-python

From: Mike Gilbert <floppym@g.o>
To: gentoo-python@l.g.o
Cc: python@g.o
Subject: [gentoo-python] Re: [PATCH 10/10 updated] Replace static EPYTHON setting with python-any-r1.
Date: Thu, 29 Nov 2012 19:58:34
Message-Id: CAJ0EP43e-XE6XO5Yu49FOSMZBM1mw8ouSYTEJ4bH6mDx4g6aog@mail.gmail.com
In Reply to: [gentoo-python] [PATCH 10/10 updated] Replace static EPYTHON setting with python-any-r1. by "Michał Górny"
1 On Thu, Nov 29, 2012 at 2:44 PM, Michał Górny <mgorny@g.o> wrote:
2 > This way, the ebuild will check for the best installed Python version
3 > satisfying the dep and use it if necessary.
4 > ---
5 > gx86/dev-lang/python/python-2.7.3-r3.ebuild | 10 ++++++++--
6 > 1 file changed, 8 insertions(+), 2 deletions(-)
7 >
8 > diff --git a/gx86/dev-lang/python/python-2.7.3-r3.ebuild b/gx86/dev-lang/python/python-2.7.3-r3.ebuild
9 > index 2182837..b6349a2 100644
10 > --- a/gx86/dev-lang/python/python-2.7.3-r3.ebuild
11 > +++ b/gx86/dev-lang/python/python-2.7.3-r3.ebuild
12 > @@ -6,7 +6,10 @@ EAPI="2"
13 > WANT_AUTOMAKE="none"
14 > WANT_LIBTOOL="none"
15 >
16 > -inherit autotools eutils flag-o-matic multilib pax-utils python-utils-r1 toolchain-funcs
17 > +# Bootstrapping Python requires Python 2.
18 > +PYTHON_COMPAT=( python{2_5,2_6,2_7} pypy{1_8,1_9} )
19 > +
20
21 Using pypy when building python just feels like a bad idea to me.
22 Let's not go there.
23
24 > +inherit autotools eutils flag-o-matic multilib pax-utils python-any-r1 toolchain-funcs
25 >
26 > MY_P="Python-${PV}"
27 > PATCHSET_REVISION="1"
28 > @@ -50,6 +53,7 @@ RDEPEND="app-arch/bzip2
29 > )
30 > !!<sys-apps/portage-2.1.9"
31 > DEPEND="${RDEPEND}
32 > + ${PYTHON_DEPS}
33 > virtual/pkgconfig
34 > >=sys-devel/autoconf-2.65
35 > !sys-devel/gcc[libffi]"
36 > @@ -73,6 +77,8 @@ pkg_setup() {
37 > ewarn "You might need to migrate your databases."
38 > fi
39 > fi
40 > +
41 > + python-any-r1_pkg_setup
42 > }
43 >
44 > src_prepare() {
45 > @@ -197,7 +203,7 @@ src_configure() {
46 > }
47 >
48 > src_compile() {
49 > - emake EPYTHON="python${PV%%.*}" || die "emake failed"
50 > + default
51 >
52 > # Work around bug 329499. See also bug 413751.
53 > pax-mark m python
54 > --
55 > 1.8.0
56 >