Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o
Cc: "Michał Górny" <mgorny@g.o>
Subject: [gentoo-dev] [PATCH 1/4] python-any-r1.eclass: Update PYTHON_USEDEP to match python-r1
Date: Thu, 17 Dec 2020 21:25:00
Message-Id: 20201217212450.317226-1-mgorny@gentoo.org
1 Signed-off-by: Michał Górny <mgorny@g.o>
2 ---
3 eclass/python-any-r1.eclass | 29 ++++++++++++++---------------
4 1 file changed, 14 insertions(+), 15 deletions(-)
5
6 diff --git a/eclass/python-any-r1.eclass b/eclass/python-any-r1.eclass
7 index c634e19813e0..9fd7fd6bc27d 100644
8 --- a/eclass/python-any-r1.eclass
9 +++ b/eclass/python-any-r1.eclass
10 @@ -131,20 +131,19 @@ EXPORT_FUNCTIONS pkg_setup
11 # An eclass-generated USE-dependency string for the currently tested
12 # implementation. It is set locally for python_check_deps() call.
13 #
14 -# The generate USE-flag list is compatible with packages using python-r1,
15 -# python-single-r1 and python-distutils-ng eclasses. It must not be used
16 -# on packages using python.eclass.
17 +# The generate USE-flag list is compatible with packages using python-r1
18 +# eclass. It must not be used on packages using other eclasses.
19 #
20 # Example use:
21 # @CODE
22 # python_check_deps() {
23 -# has_version "dev-python/foo[${PYTHON_USEDEP}]"
24 +# has_version "dev-python/foo[${PYTHON_USEDEP}]"
25 # }
26 # @CODE
27 #
28 # Example value:
29 # @CODE
30 -# python_targets_python2_7(-)?,python_single_target_python2_7(+)?
31 +# python_targets_python3_7(-),-python_single_target_python3_7(-)
32 # @CODE
33
34 _python_any_set_globals() {
35 @@ -213,16 +212,16 @@ if [[ ! ${_PYTHON_ANY_R1} ]]; then
36 # @CODE
37 # || (
38 # (
39 -# dev-lang/python:2.7
40 -# dev-python/foo[python_targets_python2_7(-)?,python_single_target_python2_7(+)?]
41 -# || ( dev-python/bar[python_targets_python2_7(-)?,python_single_target_python2_7(+)?]
42 -# dev-python/baz[python_targets_python2_7(-)?,python_single_target_python2_7(+)?] )
43 +# dev-lang/python:3.7
44 +# dev-python/foo[python_targets_python3_7(-),-python_single_target_python3_7(-)]
45 +# || ( dev-python/bar[python_targets_python3_7(-),-python_single_target_python3_7(-)]
46 +# dev-python/baz[python_targets_python3_7(-),-python_single_target_python3_7(-)] )
47 # )
48 # (
49 -# dev-lang/python:3.3
50 -# dev-python/foo[python_targets_python3_3(-)?,python_single_target_python3_3(+)?]
51 -# || ( dev-python/bar[python_targets_python3_3(-)?,python_single_target_python3_3(+)?]
52 -# dev-python/baz[python_targets_python3_3(-)?,python_single_target_python3_3(+)?] )
53 +# dev-lang/python:3.8
54 +# dev-python/foo[python_targets_python3_8(-),-python_single_target_python3_8(-)]
55 +# || ( dev-python/bar[python_targets_python3_8(-),-python_single_target_python3_8(-)]
56 +# dev-python/baz[python_targets_python3_8(-),-python_single_target_python3_8(-)] )
57 # )
58 # )
59 # @CODE
60 @@ -234,7 +233,7 @@ python_gen_any_dep() {
61
62 local i PYTHON_PKG_DEP out=
63 for i in "${_PYTHON_SUPPORTED_IMPLS[@]}"; do
64 - local PYTHON_USEDEP="python_targets_${i}(-),python_single_target_${i}(+)"
65 + local PYTHON_USEDEP="python_targets_${i}(-),-python_single_target_${i}(-)"
66 _python_export "${i}" PYTHON_PKG_DEP
67
68 local i_depstr=${depstr//\$\{PYTHON_USEDEP\}/${PYTHON_USEDEP}}
69 @@ -268,7 +267,7 @@ _python_EPYTHON_supported() {
70 if has "${i}" "${_PYTHON_SUPPORTED_IMPLS[@]}"; then
71 if python_is_installed "${i}"; then
72 if declare -f python_check_deps >/dev/null; then
73 - local PYTHON_USEDEP="python_targets_${i}(-),python_single_target_${i}(+)"
74 + local PYTHON_USEDEP="python_targets_${i}(-),-python_single_target_${i}(-)"
75 python_check_deps
76 return ${?}
77 fi
78 --
79 2.29.2

Replies