Gentoo Archives: gentoo-python

From: Brian Harring <ferringb@×××××.com>
To: Mike Gilbert <floppym@g.o>
Cc: Micha?? G??rny <mgorny@g.o>, gentoo-python@l.g.o, python@g.o
Subject: Re: [gentoo-python] python-r1 <-> python.eclass package dependencies
Date: Sun, 11 Nov 2012 23:50:10
Message-Id: 20121111235003.GB23241@localhost.corp.google.com
In Reply to: Re: [gentoo-python] python-r1 <-> python.eclass package dependencies by Mike Gilbert
1 On Sun, Nov 11, 2012 at 01:35:20PM -0500, Mike Gilbert wrote:
2 > On Sun, Nov 11, 2012 at 2:52 AM, Brian Harring <ferringb@×××××.com> wrote:
3 > > So... thus:
4 > >
5 > > 1) make python.eclass know of both forms of USE_PYTHON (with periods,
6 > > without).
7 > > 2) convert USE_PYTHON to a use expanded target
8 > > 3) convert python.eclass to use it.
9 > >
10 > > I realize this deprecates/kills PYTHON_TARGETS; my intention here
11 > > isn't to piss on the var you added, it's to choose the less disruptive
12 > > option here- lesser of two evils. Starting from scratch,
13 > > PYTHON_TARGETS would be fine- unfortunately we need to map existing
14 > > users (and usage) from python.eclass into the replacement,
15 > > constraining our choises a bit.
16 > >
17 > > Counter arguments? To be clear, this is the path I strongly suggest
18 > > we take- if you can punch holes in the logic/arguments from above, I'd
19 > > definitely back down, but the use of PYTHON_TARGETS here feels like
20 > > we're setting ourselves up for unnecessary pain. Keep in mind not
21 > > *all* of python.eclass notions/setup has to be chucked- we can
22 > > translate certain parts of it across to ease developer/user pains.
23 > >
24 >
25 > Following up on this and the irc conversation I eavesdropped on earlier:
26 >
27 > More recent versions of portage apparently filter USE_EXPAND
28 > variables, so we can't utilize the old python abi values in USE_PYTHON
29 > if we make that conversion.
30
31 Just a note; portage's behaviour here, per the norm, is more stupid
32 than that. EAPIs 0-4 are supposed to /not/ have that filtering,
33 meaning portage broke it's own behaviour again.
34
35 I suspect we'll retroactively change EAPIs to compensate for this, but
36 I don't know for a fact; the discussion for that will occur at
37 https://bugs.gentoo.org/442830 .
38
39
40 > Converting USE_PYTHON to a use-expand would entail the following in
41 > python.eclass:
42 >
43 > 1. Convert between values like "2_7-pypy-1_9" and "2.7-pypy-1.9"
44 > The underscore version would be used for USE and IUSE and in portage
45 > config (make.conf, profiles?).
46 > The dot version should be used by the eclass and ebuilds and in
47 > on-disk file names for backward compatibility.
48 >
49 > 2. Calculate the python abis supported by the ebuild based on
50 > _PYTHON_GLOBALLY_SUPPORTED_ABIS and RESTRICT_PYTHON_ABIS. Add these
51 > abis to IUSE.
52 > This would affect all ebuilds inheriting python.eclass with
53 > SUPPORT_PYTHON_ABIS set.
54 >
55 > This should not be difficult, but you never know with python.eclass.
56 > Personally, I just assume that nobody actually wants to touch
57 > python.eclass if it can be avoided.
58
59 As stated, I'll do the work if it decreases the pains for users and
60 eases transition (whether it be USE_PYTHON or PYTHON_TARGETS).
61
62
63 > Also, we have dug ourselves into a small hole with PYTHON_TARGETS;
64 > there is actually a news item out there that explains its use
65 > (committed about the same time Brian put on the breaks), so we are
66 > going to cause confusion if it is changed back to USE_PYTHON. I
67 > realize this is not a reason to charge blindly forward with
68 > PYTHON_TARGETS, but it needs to be considered.
69
70 This is why I asked for the "basic legwork" that involves a
71 roadmap/plan beyond the immediate patch.
72
73 The news item has had 5 days of exposure to users. It's a bit
74 amateur-hour to have to pull it, but if the USE_PYTHON fix-it route is
75 ultimately less transition pain for users, we should go down that
76 path.
77
78 I *suspect* that route may not be best, although if PYTHON_TARGETS is
79 choosen as the approach, that news item (or another) needs to be cut
80 explicitly clarifying that everything is moving away from USE_PYTHON.
81
82 Folks may view it as "an internal", but users have been using it.
83
84
85 > I think the only benefit to keeping the USE_PYTHON name is so that
86 > existing users don't have to learn another variable name. They would
87 > still need to tweak their config.
88
89 Either USE_PYTHON or PYTHON_TARGETS; the proposed notion of both is a
90 recipe for pain. To be clear, any proposal that involves both
91 existing long term is an automatic -1 from me.
92
93 ~harring

Replies