commit:     e16c12242e6eb76ff6252fa275ecc8bcc275c73f
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sun Jun 20 08:28:09 2021 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Wed Jun 23 21:44:18 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e16c1224
python-r1.eclass: Remove obsolete QA hack for PYTHON_USEDEP

Remove the QA hack for PYTHON_USEDEP that originally prevented python-r1
ebuilds from wrongly depending on python-single-r1 packages.  Since
the latter no longer define python_targets*, these dependencies are now
caught without any hacks.

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 eclass/python-r1.eclass | 18 ++++--------------
 1 file changed, 4 insertions(+), 14 deletions(-)

diff --git a/eclass/python-r1.eclass b/eclass/python-r1.eclass
index 00555e19d60..539076b5f74 100644
--- a/eclass/python-r1.eclass
+++ b/eclass/python-r1.eclass
@@ -203,15 +203,6 @@ _python_set_globals() {
 
        local flags=( "${_PYTHON_SUPPORTED_IMPLS[@]/#/python_targets_}" )
        local optflags=${flags[@]/%/(-)?}
-
-       # A nice QA trick here. Since a python-single-r1 package has to have
-       # at least one PYTHON_SINGLE_TARGET enabled (REQUIRED_USE),
-       # the following check will always fail on those packages. Therefore,
-       # it should prevent developers from mistakenly depending on packages
-       # not supporting multiple Python implementations.
-
-       local flags_st=( 
"${_PYTHON_SUPPORTED_IMPLS[@]/#/-python_single_target_}" )
-       optflags+=,${flags_st[@]/%/(-)}
        local requse="|| ( ${flags[*]} )"
        local usedep=${optflags// /,}
 
@@ -321,7 +312,6 @@ _python_gen_usedep() {
                if _python_impl_matches "${impl}" "${@}"; then
                        matches+=(
                                "python_targets_${impl}(-)?"
-                               "-python_single_target_${impl}(-)"
                        )
                fi
        done
@@ -572,8 +562,8 @@ python_gen_impl_dep() {
 #      (
 #              dev-lang/python:3.8
 #              dev-python/foo[python_single_target_python3_8(-)]
-#              || ( 
dev-python/bar[python_targets_python3_8(-),-python_single_target_python3_8(-)]
-#                      
dev-python/baz[python_targets_python3_8(-),-python_single_target_python3_8(-)] )
+#              || ( dev-python/bar[python_targets_python3_8(-)]
+#                      dev-python/baz[python_targets_python3_8(-)] )
 #      )
 # )
 # @CODE
@@ -587,7 +577,7 @@ python_gen_any_dep() {
        _python_verify_patterns "${@}"
        for i in "${_PYTHON_SUPPORTED_IMPLS[@]}"; do
                if _python_impl_matches "${i}" "${@}"; then
-                       local 
PYTHON_USEDEP="python_targets_${i}(-),-python_single_target_${i}(-)"
+                       local PYTHON_USEDEP="python_targets_${i}(-)"
                        local 
PYTHON_SINGLE_USEDEP="python_single_target_${i}(-)"
                        _python_export "${i}" PYTHON_PKG_DEP
 
@@ -799,7 +789,7 @@ python_setup() {
                        # first check if the interpreter is installed
                        python_is_installed "${impl}" || continue
                        # then run python_check_deps
-                       local 
PYTHON_USEDEP="python_targets_${impl}(-),-python_single_target_${impl}(-)"
+                       local PYTHON_USEDEP="python_targets_${impl}(-)"
                        local 
PYTHON_SINGLE_USEDEP="python_single_target_${impl}(-)"
                        python_check_deps || continue
                fi

Reply via email to