Gentoo Archives: gentoo-python

From: "Michał Górny" <mgorny@g.o>
To: Mike Gilbert <floppym@g.o>
Cc: gentoo-python <gentoo-python@l.g.o>, Gentoo Python Project <python@g.o>
Subject: Re: [gentoo-python] Re: The future of PYTHON_SINGLE_TARGET
Date: Sun, 30 Nov 2014 21:20:50
Message-Id: 20141130222039.4394ce03@pomiot.lan
In Reply to: Re: [gentoo-python] Re: The future of PYTHON_SINGLE_TARGET by Mike Gilbert
1 Dnia 2014-11-30, o godz. 16:02:35
2 Mike Gilbert <floppym@g.o> napisał(a):
3
4 > On Sun, Nov 30, 2014 at 3:50 PM, Michał Górny <mgorny@g.o> wrote:
5 > >> > B. they cause issues with REQUIRED_USE on other packages (like libpeas
6 > >> > that supports only one version of python2 and one of python3). Even
7 > >> > though PYTHON_SINGLE_TARGET results in effective use of a single impl,
8 > >> > PYTHON_TARGET USE-dep requests full PYTHON_TARGETS match on the dep.
9 > >> > Therefore, the user needs to disable other implementations anyway to
10 > >> > get the expected result.
11 > >>
12 > >> I don't understand this part. Can you please explain it? Maybe an example?
13 > >
14 > > gedit and libpeas, with gedit depending on libpeas. libpeas supports
15 > > one version of Python 2 and one of Python 3, and gedit just one
16 > > in general:
17 > >
18 > > libpeas is REQUIRED_USE=?? ( 2.* ) ?? ( 3.* )
19 > > gedit is REQUIRED_USE=^^ ( 3.* )
20 > >
21 > > So libpeas needs python-r1 with specific REQUIRED_USE. gedit would be
22 > > a candidate for python-single-r1 but...
23 > >
24 > > p-s-r1 enforces ^^ only on PYTHON_SINGLE_TARGET. So I end up with
25 > > something like:
26 > >
27 > > PYTHON_TARGETS="3.3 3.4" PYTHON_SINGLE_TARGET="3.4"
28 > >
29 > > and this enforces dependency on libpeas[3.3,3.4] which contradicts its
30 > > REQUIRED_USE. So we need also REQUIRED_USE=^^ ( 3.* ). But basically,
31 > > the whole mess with the second variable doesn't really help here.
32 > >
33 >
34 > What I take away from this is that the libpeas ebuild is really weird:
35 > supporting exactly one python2 and one python3 sounds like a horrible
36 > hack that should be fixed.
37
38 No, supporting multiple Python versions actually is a horrible hack
39 that causes us much more pain than we need. Any sane binary distro
40 limits itself to Python 2 + Python 3, and that's what libpeas addresses
41 -- the strong incompatibility between P2 and P3 that forces it to have
42 two loaders that link to different Python versions.
43
44 Of course, we could make it have up to five loaders of which at most
45 two will be practically used but is it worth the effort? We'll
46 introduce incompatibility with plugins that will in turn require
47 modifying every reverse dependency of libpeas.
48
49 --
50 Best regards,
51 Michał Górny

Attachments

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