diff options
author | Michał Górny <mgorny@gentoo.org> | 2022-02-04 22:51:22 +0100 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2022-02-09 09:43:55 +0100 |
commit | ae26acc2328b9e9b832c8dee53dcc571d77a27f2 (patch) | |
tree | 82e2678e0dc85f0dd8f62dc340522684a472d84a /eclass/python-single-r1.eclass | |
parent | python-utils-r1.eclass: Add status messages to python_optimize (diff) | |
download | gentoo-ae26acc2328b9e9b832c8dee53dcc571d77a27f2.tar.gz gentoo-ae26acc2328b9e9b832c8dee53dcc571d77a27f2.tar.bz2 gentoo-ae26acc2328b9e9b832c8dee53dcc571d77a27f2.zip |
python-utils-r1.eclass: Support matching impls by stdlib version
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 <mgorny@gentoo.org>
Diffstat (limited to 'eclass/python-single-r1.eclass')
-rw-r--r-- | eclass/python-single-r1.eclass | 18 |
1 files changed, 6 insertions, 12 deletions
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 |