diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2021-06-24 14:47:38 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2021-06-24 14:47:38 +0100 |
commit | b4d43e8c611df4a8061b6f88d9e9f6b1e3c83903 (patch) | |
tree | 911928b566777494d08ebe2c16cb64f15af71901 /eclass/python-single-r1.eclass | |
parent | 61f10f985e19dfe20a4d9552902625edd5b6eabb (diff) |
gentoo resync : 24.06.2021
Diffstat (limited to 'eclass/python-single-r1.eclass')
-rw-r--r-- | eclass/python-single-r1.eclass | 52 |
1 files changed, 24 insertions, 28 deletions
diff --git a/eclass/python-single-r1.eclass b/eclass/python-single-r1.eclass index 07db2d762ded..da0113b6d57b 100644 --- a/eclass/python-single-r1.eclass +++ b/eclass/python-single-r1.eclass @@ -7,7 +7,7 @@ # @AUTHOR: # Author: Michał Górny <mgorny@gentoo.org> # Based on work of: Krzysztof Pawlik <nelchael@gentoo.org> -# @SUPPORTED_EAPIS: 6 7 +# @SUPPORTED_EAPIS: 6 7 8 # @BLURB: An eclass for Python packages not installed for multiple implementations. # @DESCRIPTION: # An extension of the python-r1 eclass suite for packages which @@ -40,7 +40,7 @@ case "${EAPI:-0}" in [0-5]) die "Unsupported EAPI=${EAPI:-0} (too old) for ${ECLASS}" ;; - [6-7]) + [6-8]) ;; *) die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}" @@ -179,12 +179,6 @@ EXPORT_FUNCTIONS pkg_setup # python_targets_python3_4(-) # @CODE -# @ECLASS-VARIABLE: PYTHON_MULTI_USEDEP -# @OUTPUT_VARIABLE -# @DESCRIPTION: -# This is a backwards-compatibility placeholder. Use PYTHON_USEDEP -# instead. - # @ECLASS-VARIABLE: PYTHON_REQUIRED_USE # @OUTPUT_VARIABLE # @DESCRIPTION: @@ -278,11 +272,10 @@ if [[ ! ${_PYTHON_SINGLE_R1} ]]; then # are both in PYTHON_COMPAT and match any of the patterns passed # as parameters to the function. # -# The patterns can be either fnmatch-style patterns (matched via bash -# == operator against PYTHON_COMPAT values) or '-2' / '-3' to indicate -# appropriately all enabled Python 2/3 implementations (alike -# python_is_python3). Remember to escape or quote the fnmatch patterns -# to prevent accidental shell filename expansion. +# The patterns are fnmatch-style patterns (matched via bash +# == operator against PYTHON_COMPAT values). Remember to escape +# or quote the fnmatch patterns to prevent accidental shell filename +# expansion. # # This is an internal function used to implement python_gen_cond_dep. _python_gen_usedep() { @@ -312,11 +305,10 @@ _python_gen_usedep() { # are both in PYTHON_COMPAT and match any of the patterns passed # as parameters to the function. # -# The patterns can be either fnmatch-style patterns (matched via bash -# == operator against PYTHON_COMPAT values) or '-2' / '-3' to indicate -# appropriately all enabled Python 2/3 implementations (alike -# python_is_python3). Remember to escape or quote the fnmatch patterns -# to prevent accidental shell filename expansion. +# The patterns are fnmatch-style patterns (matched via bash +# == operator against PYTHON_COMPAT values). Remember to escape +# or quote the fnmatch patterns to prevent accidental shell filename +# expansion. # # Example: # @CODE @@ -350,11 +342,10 @@ python_gen_useflags() { # of Python implementations which are both in PYTHON_COMPAT and match # any of the patterns passed as the remaining parameters. # -# The patterns can be either fnmatch-style patterns (matched via bash -# == operator against PYTHON_COMPAT values) or '-2' / '-3' to indicate -# appropriately all enabled Python 2/3 implementations (alike -# python_is_python3). Remember to escape or quote the fnmatch patterns -# to prevent accidental shell filename expansion. +# The patterns are fnmatch-style patterns (matched via bash +# == operator against PYTHON_COMPAT values). Remember to escape +# or quote the fnmatch patterns to prevent accidental shell filename +# expansion. # # In order to enforce USE constraints on the packages, verbatim # '${PYTHON_SINGLE_USEDEP}' and '${PYTHON_USEDEP}' (quoted!) may @@ -395,6 +386,12 @@ python_gen_cond_dep() { fi local multi_usedep="python_targets_${impl}(-)" + if [[ ${EAPI} != [67] ]]; then + if [[ ${dep} == *\$\{PYTHON_MULTI_USEDEP\}* ]]; then + die "Replace PYTHON_MULTI_USEDEP with PYTHON_USEDEP in EAPI ${EAPI}" + fi + fi + local subdep=${dep//\$\{PYTHON_MULTI_USEDEP\}/${multi_usedep}} matches+=( "python_single_target_${impl}? ( ${subdep//\$\{PYTHON_USEDEP\}/${multi_usedep}} )" ) @@ -413,11 +410,10 @@ python_gen_cond_dep() { # patterns are passed, the output dependencies will be generated only # for the implementations matching them. # -# The patterns can be either fnmatch-style patterns (matched via bash -# == operator against PYTHON_COMPAT values) or '-2' / '-3' to indicate -# appropriately all enabled Python 2/3 implementations (alike -# python_is_python3). Remember to escape or quote the fnmatch patterns -# to prevent accidental shell filename expansion. +# The patterns are fnmatch-style patterns (matched via bash +# == operator against PYTHON_COMPAT values). Remember to escape +# or quote the fnmatch patterns to prevent accidental shell filename +# expansion. # # Use this function when you need to request different USE flags # on the Python interpreter depending on package's USE flags. If you |