Gentoo Archives: gentoo-dev

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

Attachments

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

Replies