Gentoo Archives: gentoo-dev

From: Francesco Riosa <vivo75@×××××.com>
To: gentoo-dev@l.g.o, Mike Gilbert <floppym@g.o>
Subject: Re: [gentoo-dev] RFC: ${PYTHON_COMPAT_ADD} in addition to ${PYTHON_COMPAT_OVERRIDE}
Date: Tue, 16 Jan 2018 00:05:44
Message-Id: b810c45d-8cbe-7666-ee2a-5086e6419993@gmail.com
In Reply to: Re: [gentoo-dev] RFC: ${PYTHON_COMPAT_ADD} in addition to ${PYTHON_COMPAT_OVERRIDE} by Mike Gilbert
1 On 15/01/2018 18:07, Mike Gilbert wrote:
2 > On Mon, Jan 15, 2018 at 10:27 AM, Francesco Riosa <vivo75@×××××.com> wrote:
3 >> In late 2015 ${PYTHON_COMPAT_OVERRIDE} has been standardized and added
4 >> to all python eclasses, it's useful for developers that want test and
5 >> mark the package for newer versions of python.
6 >>
7 >> However (unless I'm missing something) PYTHON_COMPAT_OVERRIDE is not
8 >> usable if:
9 >> - the user want only python 2.7 and 3.6 (latest) installed
10 >> no python 3.5
11 >> - don't want to mess dependencies (the warnings in the eclass are scary)
12 >>
13 >> So, what can be done to let the user choose it's preferred python
14 >> version(s) without having to build it's own overlay?
15 >>
16 >> One solution is to change ebuilds in tree to include a user variable in
17 >> the PYTHON* arrays, example:
18 >>
19 >> -PYTHON_COMPAT=( python3_{4,5} )
20 >> +PYTHON_COMPAT=( python3_{4,5} ${PYTHON_COMPAT_ADD} )
21 >>
22 >> if someone want to bet that packages are ok with 3.6/latest (even before
23 >> a developer tested it) then add PYTHON_COMPAT_ADD=python3_6 to
24 >> /etc/portage/make.conf and run egencache.
25 > I like the idea to inject values into PYTHON_COMPAT instead of
26 > overriding it completely. I'm pretty sure this can/should be
27 > implemented in the eclass without touching ebuilds.
28 In my mind that was to leave ebuilds developers the ability to opt out,
29 but well that could also be done in the eclasses.
30 Opt out could be beneficial for packages that only support python 2.7,
31 or where there are known and documented problems with different python
32 versions.
33 >
34 > I'm not sure I really like the idea of affecting the other metadata
35 > variables. I can see your point about wanting to remove python
36 > versions that would otherwise satisfy dependencies. If metadata is
37 > modified this way, it would definitely be "unsupported".
38 I've not tought about remove python versions, only add them (beneficial
39 for users that like to use experimental python versions)
40 However the supported python version are translated and build important
41 cached variables IUSE, DEPEND, etc. so there is no way to cleanly modify
42 those variable after the cache has been generated.
43 The only viable option is to regenerate, update or delete it.
44
45 >
46 > As far as implementation, you would probably need to write the patches for this.
47 If there is consensus that's not a problem, cannot guarantee to be fast
48 however
49 >
50 > Also, I expect the QA team might have some objections, so you may want
51 > to discuss it with them (especially mgorny) before spending too much
52 > time on it.
53 I'd like to hear mgorny opinions but that should be a more extended
54 decision than only QA and the python eclasses developer(s).
55 If nothing else because deciding that sometimes may be good to let the
56 user break the cache is a global decision and documentation need to be
57 added.

Replies