Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/
Date: Wed, 23 Jun 2021 21:44:38
Message-Id: 1624484658.e16c12242e6eb76ff6252fa275ecc8bcc275c73f.mgorny@gentoo
1 commit: e16c12242e6eb76ff6252fa275ecc8bcc275c73f
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Sun Jun 20 08:28:09 2021 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Wed Jun 23 21:44:18 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e16c1224
7
8 python-r1.eclass: Remove obsolete QA hack for PYTHON_USEDEP
9
10 Remove the QA hack for PYTHON_USEDEP that originally prevented python-r1
11 ebuilds from wrongly depending on python-single-r1 packages. Since
12 the latter no longer define python_targets*, these dependencies are now
13 caught without any hacks.
14
15 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
16
17 eclass/python-r1.eclass | 18 ++++--------------
18 1 file changed, 4 insertions(+), 14 deletions(-)
19
20 diff --git a/eclass/python-r1.eclass b/eclass/python-r1.eclass
21 index 00555e19d60..539076b5f74 100644
22 --- a/eclass/python-r1.eclass
23 +++ b/eclass/python-r1.eclass
24 @@ -203,15 +203,6 @@ _python_set_globals() {
25
26 local flags=( "${_PYTHON_SUPPORTED_IMPLS[@]/#/python_targets_}" )
27 local optflags=${flags[@]/%/(-)?}
28 -
29 - # A nice QA trick here. Since a python-single-r1 package has to have
30 - # at least one PYTHON_SINGLE_TARGET enabled (REQUIRED_USE),
31 - # the following check will always fail on those packages. Therefore,
32 - # it should prevent developers from mistakenly depending on packages
33 - # not supporting multiple Python implementations.
34 -
35 - local flags_st=( "${_PYTHON_SUPPORTED_IMPLS[@]/#/-python_single_target_}" )
36 - optflags+=,${flags_st[@]/%/(-)}
37 local requse="|| ( ${flags[*]} )"
38 local usedep=${optflags// /,}
39
40 @@ -321,7 +312,6 @@ _python_gen_usedep() {
41 if _python_impl_matches "${impl}" "${@}"; then
42 matches+=(
43 "python_targets_${impl}(-)?"
44 - "-python_single_target_${impl}(-)"
45 )
46 fi
47 done
48 @@ -572,8 +562,8 @@ python_gen_impl_dep() {
49 # (
50 # dev-lang/python:3.8
51 # dev-python/foo[python_single_target_python3_8(-)]
52 -# || ( dev-python/bar[python_targets_python3_8(-),-python_single_target_python3_8(-)]
53 -# dev-python/baz[python_targets_python3_8(-),-python_single_target_python3_8(-)] )
54 +# || ( dev-python/bar[python_targets_python3_8(-)]
55 +# dev-python/baz[python_targets_python3_8(-)] )
56 # )
57 # )
58 # @CODE
59 @@ -587,7 +577,7 @@ python_gen_any_dep() {
60 _python_verify_patterns "${@}"
61 for i in "${_PYTHON_SUPPORTED_IMPLS[@]}"; do
62 if _python_impl_matches "${i}" "${@}"; then
63 - local PYTHON_USEDEP="python_targets_${i}(-),-python_single_target_${i}(-)"
64 + local PYTHON_USEDEP="python_targets_${i}(-)"
65 local PYTHON_SINGLE_USEDEP="python_single_target_${i}(-)"
66 _python_export "${i}" PYTHON_PKG_DEP
67
68 @@ -799,7 +789,7 @@ python_setup() {
69 # first check if the interpreter is installed
70 python_is_installed "${impl}" || continue
71 # then run python_check_deps
72 - local PYTHON_USEDEP="python_targets_${impl}(-),-python_single_target_${impl}(-)"
73 + local PYTHON_USEDEP="python_targets_${impl}(-)"
74 local PYTHON_SINGLE_USEDEP="python_single_target_${impl}(-)"
75 python_check_deps || continue
76 fi