From 38423c67c8a23f6a1bc42038193182e2da3116eb Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 25 Apr 2020 11:37:10 +0100 Subject: gentoo resync : 25.04.2020 --- eclass/python-single-r1.eclass | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) (limited to 'eclass/python-single-r1.eclass') diff --git a/eclass/python-single-r1.eclass b/eclass/python-single-r1.eclass index ab3df94dcf11..d516e3629696 100644 --- a/eclass/python-single-r1.eclass +++ b/eclass/python-single-r1.eclass @@ -22,7 +22,7 @@ # The eclass exports PYTHON_SINGLE_USEDEP that is suitable for depending # on other packages using the eclass. Dependencies on packages using # python-r1 should be created via python_gen_cond_dep() function, -# using PYTHON_MULTI_USEDEP placeholder. +# using PYTHON_USEDEP placeholder. # # Please note that packages support multiple Python implementations # (using python-r1 eclass) can not depend on packages not supporting @@ -146,7 +146,7 @@ EXPORT_FUNCTIONS pkg_setup # Python implementations. # # If you need to depend on a multi-impl (python-r1) package, use -# python_gen_cond_dep with PYTHON_MULTI_USEDEP placeholder instead. +# python_gen_cond_dep with PYTHON_USEDEP placeholder instead. # # Example use: # @CODE @@ -158,7 +158,7 @@ EXPORT_FUNCTIONS pkg_setup # python_single_target_python3_4(-)? # @CODE -# @ECLASS-VARIABLE: PYTHON_MULTI_USEDEP +# @ECLASS-VARIABLE: PYTHON_USEDEP # @DESCRIPTION: # This is a placeholder variable supported by python_gen_cond_dep, # in order to depend on python-r1 packages built for the same Python @@ -167,7 +167,7 @@ EXPORT_FUNCTIONS pkg_setup # Example use: # @CODE # RDEPEND="$(python_gen_cond_dep ' -# dev-python/foo[${PYTHON_MULTI_USEDEP}] +# dev-python/foo[${PYTHON_USEDEP}] # ')" # @CODE # @@ -176,6 +176,11 @@ EXPORT_FUNCTIONS pkg_setup # python_targets_python3_4(-) # @CODE +# @ECLASS-VARIABLE: PYTHON_MULTI_USEDEP +# @DESCRIPTION: +# This is a backwards-compatibility placeholder. Use PYTHON_USEDEP +# instead. + # @ECLASS-VARIABLE: PYTHON_REQUIRED_USE # @DESCRIPTION: # This is an eclass-generated required-use expression which ensures @@ -249,7 +254,7 @@ _python_single_set_globals() { else PYTHON_DEPS=${deps} PYTHON_REQUIRED_USE=${requse} - PYTHON_USEDEP='%PYTHON_USEDEP-HAS-BEEN-REMOVED%' + PYTHON_USEDEP='%PYTHON_USEDEP-NEEDS-TO-BE-USED-IN-PYTHON_GEN_COND_DEP%' PYTHON_SINGLE_USEDEP=${single_usedep} readonly PYTHON_DEPS PYTHON_REQUIRED_USE PYTHON_SINGLE_USEDEP \ PYTHON_USEDEP @@ -345,7 +350,7 @@ python_gen_useflags() { # to prevent accidental shell filename expansion. # # In order to enforce USE constraints on the packages, verbatim -# '${PYTHON_SINGLE_USEDEP}' and '${PYTHON_MULTI_USEDEP}' (quoted!) may +# '${PYTHON_SINGLE_USEDEP}' and '${PYTHON_USEDEP}' (quoted!) may # be placed in the dependency specification. It will get expanded within # the function into a proper USE dependency string. # @@ -353,7 +358,7 @@ python_gen_useflags() { # @CODE # PYTHON_COMPAT=( python{2_7,3_{3,4}} pypy ) # RDEPEND="$(python_gen_cond_dep \ -# 'dev-python/unittest2[${PYTHON_MULTI_USEDEP}]' python2_7 pypy )" +# 'dev-python/unittest2[${PYTHON_USEDEP}]' python2_7 pypy )" # @CODE # # It will cause the variable to look like: @@ -382,8 +387,9 @@ python_gen_cond_dep() { fi local multi_usedep="python_targets_${impl}(-)" + local subdep=${dep//\$\{PYTHON_MULTI_USEDEP\}/${multi_usedep}} matches+=( "python_single_target_${impl}? ( - ${dep//\$\{PYTHON_MULTI_USEDEP\}/${multi_usedep}} )" ) + ${subdep//\$\{PYTHON_USEDEP\}/${multi_usedep}} )" ) fi done -- cgit v1.2.3