commit:     be1edb17e855e0723c5e88a90eb510e7e8226288
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sun Oct 26 16:40:52 2025 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sun Oct 26 16:40:52 2025 +0000
URL:        https://gitweb.gentoo.org/proj/gpyutils.git/commit/?id=be1edb17

list_pkg_impls: Report attestations as well

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 gpyutils/scripts/list_pkg_impls.py | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/gpyutils/scripts/list_pkg_impls.py 
b/gpyutils/scripts/list_pkg_impls.py
index a97f9e5..c3cbf5b 100755
--- a/gpyutils/scripts/list_pkg_impls.py
+++ b/gpyutils/scripts/list_pkg_impls.py
@@ -78,13 +78,20 @@ def process(pkgs,
             if ptype is None:
                 ptype = "(legacy)"
                 test = " "
+                attest = " "
 
-                if "distutils-r1" in p.inherits or "test" not in p.restrict:
+                if (
+                    "distutils-r1" in p.inherits or
+                    "test" not in p.restrict or
+                    "pypi" in p.inherits
+                ):
                     with open(p.path) as f:
                         for x in f:
                             if x.startswith("DISTUTILS_USE_PEP517="):
                                 ptype = "(PEP517)"
-                            if x.startswith(("distutils_enable_tests ",
+                            elif x.startswith("PYPI_VERIFY_REPO="):
+                                attest = "A"
+                            elif x.startswith(("distutils_enable_tests ",
                                              "python_test()")):
                                 test = "T"
                                 # we do not need to scan for anything else
@@ -98,6 +105,8 @@ def process(pkgs,
                     test = "r"
                 if "distutils-r1" not in p.inherits:
                     ptype = "        "
+                if "pypi" not in p.inherits:
+                    attest = " "
 
             if kw_impls and st_impls:
                 break
@@ -120,7 +129,7 @@ def process(pkgs,
             test_color = 4
         else:
             test_color = 11
-        out.append(c(test, test_color))
+        out.append(c(attest, 9) + c(test, test_color))
 
         if st_impls:
             out.append(" STABLE:")

Reply via email to