commit:     7bde46c48215db885e83c42c7881d7ae8f422361
Author:     Brian Harring <ferringb <AT> gmail <DOT> com>
AuthorDate: Mon Nov 24 15:48:45 2025 +0000
Commit:     Brian Harring <ferringb <AT> gmail <DOT> com>
CommitDate: Mon Nov 24 15:48:45 2025 +0000
URL:        
https://gitweb.gentoo.org/proj/pkgcore/pkgcheck.git/commit/?id=7bde46c4

chore: add PKGCHECK_DEBUG_SDIST=1 support working on generated files

I've just been shoving a return in there, and one of these days I
was going to forget to remove it.  Thus do this instead.

Signed-off-by: Brian Harring <ferringb <AT> gmail.com>

 py_build.py | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/py_build.py b/py_build.py
index 0a3917a4..a5c4cf89 100644
--- a/py_build.py
+++ b/py_build.py
@@ -115,6 +115,11 @@ def create_generated_files():
         write_files(cleanup_files)
         yield
     finally:
+        if os.environ.get("PKGCHECK_DEBUG_SDIST"):
+            print(
+                "WARNING: not wiping cleanup files since PKGCHECK_DEBUG_SDIST 
is set in the environment"
+            )
+            return
         for path in cleanup_files:
             try:
                 path.unlink()

Reply via email to