1 |
On Tue, May 16, 2017 at 10:19 AM, Michał Górny <mgorny@g.o> wrote: |
2 |
|
3 |
> On wto, 2017-05-02 at 14:48 -0700, Zac Medico wrote: |
4 |
> > This is intended to be set by the user when using ebuilds that may |
5 |
> > have unknown implementations in PYTHON_COMPAT. The assumption is |
6 |
> > that the ebuilds are intended to be used within multiple contexts |
7 |
> > which can involve revisions of this eclass that support different |
8 |
> > python implementations. |
9 |
> > --- |
10 |
> > eclass/python-utils-r1.eclass | 16 ++++++++++++++++ |
11 |
> > 1 file changed, 16 insertions(+) |
12 |
> > |
13 |
> > diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1. |
14 |
> eclass |
15 |
> > index 66a359e..1846da3 100644 |
16 |
> > --- a/eclass/python-utils-r1.eclass |
17 |
> > +++ b/eclass/python-utils-r1.eclass |
18 |
> > @@ -47,6 +47,21 @@ _PYTHON_ALL_IMPLS=( |
19 |
> > ) |
20 |
> > readonly _PYTHON_ALL_IMPLS |
21 |
> > |
22 |
> > +# @ECLASS-VARIABLE: PYTHON_IMPLS_NO_STRICT |
23 |
> > +# @DESCRIPTION: |
24 |
> > +# Tolerate unknown implementations in PYTHON_COMPAT. |
25 |
> > +# |
26 |
> > +# This is intended to be set by the user when using ebuilds that may |
27 |
> > +# have unknown implementations in PYTHON_COMPAT. The assumption is |
28 |
> > +# that the ebuilds are intended to be used within multiple contexts |
29 |
> > +# which can involve revisions of this eclass that support different |
30 |
> > +# python implementations. |
31 |
> > +# |
32 |
> > +# Example: |
33 |
> > +# @CODE |
34 |
> > +# PYTHON_IMPLS_NO_STRICT=1 |
35 |
> > +# @CODE |
36 |
> > + |
37 |
> > # @FUNCTION: _python_impl_supported |
38 |
> > # @USAGE: <impl> |
39 |
> > # @INTERNAL |
40 |
> > @@ -79,6 +94,7 @@ _python_impl_supported() { |
41 |
> > fi |
42 |
> > ;; |
43 |
> > *) |
44 |
> > + [[ -n ${PYTHON_IMPLS_NO_STRICT} ]] && return 1 |
45 |
> > die "Invalid implementation in PYTHON_COMPAT: |
46 |
> ${impl}" |
47 |
> > esac |
48 |
> > } |
49 |
> |
50 |
> I've changed the name to PYTHON_COMPAT_NO_STRICT to fit the eclasses |
51 |
> better, and marked it @INTERNAL. Otherwise, committed now. |
52 |
|
53 |
|
54 |
Okay, thanks! |
55 |
-- |
56 |
Thanks, |
57 |
Zac |