commit:     ccb467c9a661ac735e9c8fc72263647c6f8a0c7e
Author:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
AuthorDate: Thu Jul  4 20:00:17 2024 +0000
Commit:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
CommitDate: Thu Jul  4 20:00:17 2024 +0000
URL:        
https://gitweb.gentoo.org/proj/pkgcore/pkgcheck.git/commit/?id=ccb467c9

DistutilsNonPEP517Build: handle false positive with eclass defined

Now that most ebuilds use PEP-517 mode, we can relax the check a little
to handle cases where the variable is set in the eclass (for example
tree-sitter based ebuilds).

Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org>

 src/pkgcheck/checks/python.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/pkgcheck/checks/python.py b/src/pkgcheck/checks/python.py
index ae448360..229bb3e9 100644
--- a/src/pkgcheck/checks/python.py
+++ b/src/pkgcheck/checks/python.py
@@ -376,7 +376,8 @@ class PythonCheck(Check):
         bdepends = frozenset(map(attrgetter("key"), 
iflatten_instance(pkg.bdepend, atom)))
 
         if pep517_value is None:
-            yield DistutilsNonPEP517Build(pkg=pkg)
+            if "dev-python/gpep517" not in bdepends:
+                yield DistutilsNonPEP517Build(pkg=pkg)
         elif has_distutils_optional and not has_distutils_deps and 
pep517_value != "no":
             # We always need BDEPEND for these if != no.
             # We are looking for USE-conditional on appropriate target

Reply via email to