Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o
Cc: python@g.o, "Michał Górny" <mgorny@g.o>
Subject: [gentoo-dev] [PATCH v2 18/20] python-single-r2.eclass: PYTHON_MULTI_USEDEP → PYTHON_USEDEP
Date: Thu, 05 Mar 2020 15:17:25
Message-Id: 20200305151024.125834-19-mgorny@gentoo.org
In Reply to: [gentoo-dev] [PATCH v2 00/20] python-r2 suite by "Michał Górny"
1 Rename PYTHON_MULTI_USEDEP to PYTHON_USEDEP for consistency with other
2 eclasses. Since the old PYTHON_USEDEP API is no longer supported,
3 the name is free again.
4
5 Signed-off-by: Michał Górny <mgorny@g.o>
6 ---
7 eclass/python-single-r2.eclass | 16 ++++++++--------
8 1 file changed, 8 insertions(+), 8 deletions(-)
9
10 diff --git a/eclass/python-single-r2.eclass b/eclass/python-single-r2.eclass
11 index ce170c1d13c9..09fc47cbc064 100644
12 --- a/eclass/python-single-r2.eclass
13 +++ b/eclass/python-single-r2.eclass
14 @@ -21,7 +21,7 @@
15 # The eclass exports PYTHON_SINGLE_USEDEP that is suitable for depending
16 # on other packages using the eclass. Dependencies on packages using
17 # python-r2 should be created via python_gen_cond_dep() function,
18 -# using PYTHON_MULTI_USEDEP placeholder.
19 +# using PYTHON_USEDEP placeholder.
20 #
21 # Please note that packages support multiple Python implementations
22 # (using python-r2 eclass) can not depend on packages not supporting
23 @@ -145,7 +145,7 @@ EXPORT_FUNCTIONS pkg_setup
24 # Python implementations.
25 #
26 # If you need to depend on a multi-impl (python-r2) package, use
27 -# python_gen_cond_dep with PYTHON_MULTI_USEDEP placeholder instead.
28 +# python_gen_cond_dep with PYTHON_USEDEP placeholder instead.
29 #
30 # Example use:
31 # @CODE
32 @@ -157,7 +157,7 @@ EXPORT_FUNCTIONS pkg_setup
33 # python_single_target_python3_4(-)?
34 # @CODE
35
36 -# @ECLASS-VARIABLE: PYTHON_MULTI_USEDEP
37 +# @ECLASS-VARIABLE: PYTHON_USEDEP
38 # @DESCRIPTION:
39 # This is a placeholder variable supported by python_gen_cond_dep,
40 # in order to depend on python-r2 packages built for the same Python
41 @@ -166,7 +166,7 @@ EXPORT_FUNCTIONS pkg_setup
42 # Example use:
43 # @CODE
44 # RDEPEND="$(python_gen_cond_dep '
45 -# dev-python/foo[${PYTHON_MULTI_USEDEP}]
46 +# dev-python/foo[${PYTHON_USEDEP}]
47 # ')"
48 # @CODE
49 #
50 @@ -248,7 +248,7 @@ _python_single_set_globals() {
51 else
52 PYTHON_DEPS=${deps}
53 PYTHON_REQUIRED_USE=${requse}
54 - PYTHON_USEDEP='%PYTHON_USEDEP-HAS-BEEN-REMOVED%'
55 + PYTHON_USEDEP='%PYTHON_USEDEP-MUST-BE-IN-python_gen_cond_dep%'
56 PYTHON_SINGLE_USEDEP=${single_usedep}
57 readonly PYTHON_DEPS PYTHON_REQUIRED_USE PYTHON_SINGLE_USEDEP \
58 PYTHON_USEDEP
59 @@ -344,7 +344,7 @@ python_gen_useflags() {
60 # to prevent accidental shell filename expansion.
61 #
62 # In order to enforce USE constraints on the packages, verbatim
63 -# '${PYTHON_SINGLE_USEDEP}' and '${PYTHON_MULTI_USEDEP}' (quoted!) may
64 +# '${PYTHON_SINGLE_USEDEP}' and '${PYTHON_USEDEP}' (quoted!) may
65 # be placed in the dependency specification. It will get expanded within
66 # the function into a proper USE dependency string.
67 #
68 @@ -352,7 +352,7 @@ python_gen_useflags() {
69 # @CODE
70 # PYTHON_COMPAT=( python{2_7,3_{3,4}} pypy )
71 # RDEPEND="$(python_gen_cond_dep \
72 -# 'dev-python/unittest2[${PYTHON_MULTI_USEDEP}]' python2_7 pypy )"
73 +# 'dev-python/unittest2[${PYTHON_USEDEP}]' python2_7 pypy )"
74 # @CODE
75 #
76 # It will cause the variable to look like:
77 @@ -382,7 +382,7 @@ python_gen_cond_dep() {
78 local multi_usedep="python_targets_${impl}(-)"
79
80 matches+=( "python_single_target_${impl}? (
81 - ${dep//\$\{PYTHON_MULTI_USEDEP\}/${multi_usedep}} )" )
82 + ${dep//\$\{PYTHON_USEDEP\}/${multi_usedep}} )" )
83 fi
84 done
85
86 --
87 2.25.1