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 05/30] python-r1.eclass: Remove deprecated python_gen_usedep
Date: Sun, 06 Feb 2022 12:50:51
Message-Id: 20220206124841.1299133-6-mgorny@gentoo.org
In Reply to: [gentoo-dev] [PATCH 00/30] One batch of Python eclass updates to rule them all by "Michał Górny"
1 This function is deprecated for some time already and there are no more
2 consumers left in ::gentoo.
3
4 Signed-off-by: Michał Górny <mgorny@g.o>
5 ---
6 eclass/python-r1.eclass | 43 +----------------------------------------
7 1 file changed, 1 insertion(+), 42 deletions(-)
8
9 diff --git a/eclass/python-r1.eclass b/eclass/python-r1.eclass
10 index 40ad4ef4bbf8..f9a9e9465b40 100644
11 --- a/eclass/python-r1.eclass
12 +++ b/eclass/python-r1.eclass
13 @@ -294,8 +294,7 @@ _python_validate_useflags() {
14 # or quote the fnmatch patterns to prevent accidental shell filename
15 # expansion.
16 #
17 -# This is an internal function used to implement python_gen_cond_dep
18 -# and deprecated python_gen_usedep.
19 +# This is an internal function used to implement python_gen_cond_dep.
20 _python_gen_usedep() {
21 debug-print-function ${FUNCNAME} "${@}"
22
23 @@ -316,46 +315,6 @@ _python_gen_usedep() {
24 echo "${out// /,}"
25 }
26
27 -# @FUNCTION: python_gen_usedep
28 -# @USAGE: <pattern> [...]
29 -# @DESCRIPTION:
30 -# DEPRECATED. Please use python_gen_cond_dep instead.
31 -#
32 -# Output a USE dependency string for Python implementations which
33 -# are both in PYTHON_COMPAT and match any of the patterns passed
34 -# as parameters to the function.
35 -#
36 -# The patterns are fnmatch-style patterns (matched via bash
37 -# == operator against PYTHON_COMPAT values). Remember to escape
38 -# or quote the fnmatch patterns to prevent accidental shell filename
39 -# expansion.
40 -#
41 -# When all implementations are requested, please use ${PYTHON_USEDEP}
42 -# instead. Please also remember to set an appropriate REQUIRED_USE
43 -# to avoid ineffective USE flags.
44 -#
45 -# Example:
46 -# @CODE
47 -# PYTHON_COMPAT=( python{2_7,3_4} )
48 -# BDEPEND="doc? ( dev-python/epydoc[$(python_gen_usedep 'python2*')] )"
49 -# @CODE
50 -#
51 -# It will cause the dependency to look like:
52 -# @CODE
53 -# BDEPEND="doc? ( dev-python/epydoc[python_targets_python2_7?] )"
54 -# @CODE
55 -python_gen_usedep() {
56 - debug-print-function ${FUNCNAME} "${@}"
57 -
58 - # output only once, during some reasonable phase
59 - # (avoid spamming cache regen runs)
60 - if [[ ${EBUILD_PHASE} == setup ]]; then
61 - eqawarn "python_gen_usedep() is deprecated. Please use python_gen_cond_dep instead."
62 - fi
63 - [[ ${EAPI} == [67] ]] || die "${FUNCNAME} banned in EAPI ${EAPI}"
64 - _python_gen_usedep "${@}"
65 -}
66 -
67 # @FUNCTION: python_gen_useflags
68 # @USAGE: [<pattern>...]
69 # @DESCRIPTION:
70 --
71 2.35.1