Don't crash on clean
authorDebian Science Team <debian-science-maintainers@lists.alioth.debian.org>
Tue, 28 Jan 2025 22:18:06 +0000 (22:18 +0000)
committerRebecca N. Palmer <rebecca_palmer@zoho.com>
Tue, 28 Jan 2025 22:18:06 +0000 (22:18 +0000)
Author: Rebecca N. Palmer <rebecca_palmer@zoho.com>
Forwarded: no

Gbp-Pq: Name unbreak_clean.patch

setup.py

index c7c76d0f7636afbf6ef0ed477f8384969a770f40..42b1cb3bee021eccada59791984b2d7ac4d7d804 100755 (executable)
--- a/setup.py
+++ b/setup.py
@@ -152,14 +152,14 @@ class CleanCommand(Command):
                     ".orig",
                 ):
                     self._clean_me.append(filepath)
-            self._clean_trees.append(pjoin(root, d) for d in dirs if d == "__pycache__")
+            self._clean_trees.extend([pjoin(root, d) for d in dirs if d == "__pycache__"])
 
         # clean the generated pxi files
         for pxifile in _pxifiles:
             pxifile_replaced = pxifile.replace(".pxi.in", ".pxi")
             self._clean_me.append(pxifile_replaced)
 
-        self._clean_trees.append(d for d in ("build", "dist") if os.path.exists(d))
+        self._clean_trees.extend([d for d in ("build", "dist") if os.path.exists(d)])
 
     def finalize_options(self) -> None:
         pass