commit:     c32c3d482fde2bc6df8726b7111edf00670b6b0e
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 21 17:02:41 2024 +0000
Commit:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
CommitDate: Mon Oct 21 17:41:16 2024 +0000
URL:        
https://gitweb.gentoo.org/proj/pkgcore/pkgcheck.git/commit/?id=c32c3d48

python: Support dev-lang/pypy package

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
Closes: https://github.com/pkgcore/pkgcheck/pull/708
Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org>

 src/pkgcheck/checks/python.py                                         | 2 +-
 .../pypy3/pypy-7.3.17.ebuild => dev-lang/pypy/pypy-2.7.7.3.17.ebuild} | 4 ++--
 .../pypy-7.3.17.ebuild => dev-lang/pypy/pypy-3.10.7.3.17.ebuild}      | 2 +-
 testdata/repos/python/eclass/python-any-r1.eclass                     | 2 +-
 testdata/repos/python/eclass/python-r1.eclass                         | 2 +-
 testdata/repos/python/eclass/python-single-r1.eclass                  | 2 +-
 6 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/pkgcheck/checks/python.py b/src/pkgcheck/checks/python.py
index 2c46885a..bacbdb5a 100644
--- a/src/pkgcheck/checks/python.py
+++ b/src/pkgcheck/checks/python.py
@@ -48,7 +48,7 @@ def get_python_eclass(pkg):
 
 
 def is_python_interpreter(pkg):
-    if pkg.key == "dev-lang/python":
+    if pkg.key in ("dev-lang/pypy", "dev-lang/python"):
         # ignore python:2.7 deps since they are being phased out from eclass
         # support
         return pkg.slot is None or not pkg.slot.startswith("2")

diff --git a/testdata/repos/python/dev-python/pypy3/pypy-7.3.17.ebuild 
b/testdata/repos/python/dev-lang/pypy/pypy-2.7.7.3.17.ebuild
similarity index 51%
copy from testdata/repos/python/dev-python/pypy3/pypy-7.3.17.ebuild
copy to testdata/repos/python/dev-lang/pypy/pypy-2.7.7.3.17.ebuild
index 5c7e964e..36ab208d 100644
--- a/testdata/repos/python/dev-python/pypy3/pypy-7.3.17.ebuild
+++ b/testdata/repos/python/dev-lang/pypy/pypy-2.7.7.3.17.ebuild
@@ -1,6 +1,6 @@
 EAPI=8
 
-DESCRIPTION="Stub ebuild for pypy3 interpreter"
+DESCRIPTION="Stub ebuild for pypy interpreter"
 HOMEPAGE="https://github.com/pkgcore/pkgcheck";
 LICENSE="BSD"
-SLOT="0/pypy310"
+SLOT="2.7/1234"

diff --git a/testdata/repos/python/dev-python/pypy3/pypy-7.3.17.ebuild 
b/testdata/repos/python/dev-lang/pypy/pypy-3.10.7.3.17.ebuild
similarity index 82%
rename from testdata/repos/python/dev-python/pypy3/pypy-7.3.17.ebuild
rename to testdata/repos/python/dev-lang/pypy/pypy-3.10.7.3.17.ebuild
index 5c7e964e..6d32fa2f 100644
--- a/testdata/repos/python/dev-python/pypy3/pypy-7.3.17.ebuild
+++ b/testdata/repos/python/dev-lang/pypy/pypy-3.10.7.3.17.ebuild
@@ -3,4 +3,4 @@ EAPI=8
 DESCRIPTION="Stub ebuild for pypy3 interpreter"
 HOMEPAGE="https://github.com/pkgcore/pkgcheck";
 LICENSE="BSD"
-SLOT="0/pypy310"
+SLOT="3.10/pypy310-1234"

diff --git a/testdata/repos/python/eclass/python-any-r1.eclass 
b/testdata/repos/python/eclass/python-any-r1.eclass
index 68c9774c..56aa329c 100644
--- a/testdata/repos/python/eclass/python-any-r1.eclass
+++ b/testdata/repos/python/eclass/python-any-r1.eclass
@@ -21,7 +21,7 @@ _python_set_impls() {
                                PYTHON_DEPS+=" dev-lang/python:${slot}"
                                ;;
                        pypy3)
-                               PYTHON_DEPS+=" dev-python/pypy3:="
+                               PYTHON_DEPS+=" >=dev-lang/pypy-3.10:="
                                ;;
                esac
        done

diff --git a/testdata/repos/python/eclass/python-r1.eclass 
b/testdata/repos/python/eclass/python-r1.eclass
index e33047ca..0bac0d92 100644
--- a/testdata/repos/python/eclass/python-r1.eclass
+++ b/testdata/repos/python/eclass/python-r1.eclass
@@ -22,7 +22,7 @@ _python_set_impls() {
                                PYTHON_DEPS+=" python_targets_${i}? ( 
dev-lang/python:${slot} )"
                                ;;
                        pypy3)
-                               PYTHON_DEPS+=" python_targets_${i}? ( 
dev-python/pypy3:= )"
+                               PYTHON_DEPS+=" python_targets_${i}? ( 
>=dev-lang/pypy-3.10:= )"
                                ;;
                esac
        done

diff --git a/testdata/repos/python/eclass/python-single-r1.eclass 
b/testdata/repos/python/eclass/python-single-r1.eclass
index a7049ac0..5a8debca 100644
--- a/testdata/repos/python/eclass/python-single-r1.eclass
+++ b/testdata/repos/python/eclass/python-single-r1.eclass
@@ -22,7 +22,7 @@ _python_set_impls() {
                                PYTHON_DEPS+=" python_single_target_${i}? ( 
dev-lang/python:${slot} )"
                                ;;
                        pypy3)
-                               PYTHON_DEPS+=" python_single_target_${i}? ( 
dev-python/pypy3:= )"
+                               PYTHON_DEPS+=" python_single_target_${i}? ( 
>=dev-lang/pypy-3.10:= )"
                                ;;
                esac
        done

Reply via email to