From ae26acc2328b9e9b832c8dee53dcc571d77a27f2 Mon Sep 17 00:00:00 2001 From: Michał Górny Date: Fri, 4 Feb 2022 22:51:22 +0100 Subject: python-utils-r1.eclass: Support matching impls by stdlib version MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Update _python_impl_matches() (used to implement python_gen*, python_setup) to support specifying stdlib versions ("3.8", "3.9") in addition to exact implementation names. This makes handling PyPy3 version changes much easier when dealing with backports. For example, if you specify "3.8", then the spec will match python3_8 and pypy3, for as long as we supply PyPy3.8. Once we upgrade to PyPy3.9 completely, it will stop matching pypy3 and we won't have to manually keep updating these deps. Signed-off-by: Michał Górny --- eclass/python-single-r1.eclass | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) (limited to 'eclass/python-single-r1.eclass') diff --git a/eclass/python-single-r1.eclass b/eclass/python-single-r1.eclass index 0e9a16a47d0e..998e6faad841 100644 --- a/eclass/python-single-r1.eclass +++ b/eclass/python-single-r1.eclass @@ -266,10 +266,8 @@ if [[ ! ${_PYTHON_SINGLE_R1} ]]; then # are both in PYTHON_COMPAT and match any of the patterns passed # as parameters to the function. # -# 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. +# For the pattern syntax, please see _python_impl_matches +# in python-utils-r1.eclass. # # Example: # @CODE @@ -303,10 +301,8 @@ 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 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. +# For the pattern syntax, please see _python_impl_matches +# in python-utils-r1.eclass. # # In order to enforce USE constraints on the packages, verbatim # '${PYTHON_SINGLE_USEDEP}' and '${PYTHON_USEDEP}' (quoted!) may @@ -359,10 +355,8 @@ python_gen_cond_dep() { # patterns are passed, the output dependencies will be generated only # for the implementations matching them. # -# 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. +# For the pattern syntax, please see _python_impl_matches +# in python-utils-r1.eclass. # # Use this function when you need to request different USE flags # on the Python interpreter depending on package's USE flags. If you -- cgit v1.2.3-65-gdbad