• [gentoo-dev] [PATCH 1/2] python-utils-r1.eclass: pypy3 is now Python 3.

    From =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?@21:1/5 to All on Thu Apr 21 10:50:01 2022
    Signed-off-by: Michał Górny <mgorny@gentoo.org>
    ---
    eclass/python-utils-r1.eclass | 6 +++---
    1 file changed, 3 insertions(+), 3 deletions(-)

    diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass index 98cb49c95fd7..a6f5f24c8bdd 100644
    --- a/eclass/python-utils-r1.eclass
    +++ b/eclass/python-utils-r1.eclass
    @@ -240,12 +240,12 @@ _python_impl_matches() {
    fi
    return 0
    ;;
    - 3.8)
    - # the only unmasked pypy3 version is pypy3.8 atm
    + 3.9)
    + # the only unmasked pypy3 version is pypy3.9 atm
    [[ ${impl} == python${pattern/./_} || ${impl} == pypy3 ]] &&
    return 0
    ;;
    - 3.9|3.10)
    + 3.8|3.10)
    [[ ${impl} == python${pattern/./_} ]] && return 0
    ;;
    *)
    --
    2.35.1

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?@21:1/5 to All on Thu Apr 21 10:50:01 2022
    Signed-off-by: Michał Górny <mgorny@gentoo.org>
    ---
    eclass/tests/python-utils-r1.sh | 9 +++++++++
    1 file changed, 9 insertions(+)

    diff --git a/eclass/tests/python-utils-r1.sh b/eclass/tests/python-utils-r1.sh index ef7687b8a9cf..9c41798c4727 100755
    --- a/eclass/tests/python-utils-r1.sh
    +++ b/eclass/tests/python-utils-r1.sh
    @@ -223,6 +223,15 @@ test_is "_python_impl_matches python3_6 python*" 0
    test_is "_python_impl_matches python3_7 python*" 0
    test_is "_python_impl_matches pypy3 python*" 1
    set +f
    +test_is "_python_impl_matches python3_8 3.8" 0
    +test_is "_python_impl_matches python3_8 3.9" 1
    +test_is "_python_impl_matches python3_8 3.10" 1
    +test_is "_python_impl_matches python3_9 3.8" 1
    +test_is "_python_impl_matches python3_9 3.9" 0
    +test_is "_python_impl_matches python3_9 3.10" 1
    +test_is "_python_impl_matches pypy3 3.8" 1
    +test_is "_python_impl_matches pypy3 3.9" 0
    +test_is "_python_impl_matches pypy3 3.10" 1

    rm "${tmpfile}"

    --
    2.35.1

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)