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