From ba41e534a4b79d15645d00d76269520fc6708dc0 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 19 May 2008 12:44:56 -0400 Subject: [PATCH] dh_auto_clean: setup.py clean can create pyc files. Remove. Closes: #481899 --- debian/changelog | 1 + dh_auto_clean | 3 +++ 2 files changed, 4 insertions(+) diff --git a/debian/changelog b/debian/changelog index c5b5e48..8854fa4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -9,6 +9,7 @@ debhelper (7.0.9) UNRELEASED; urgency=low * dh: fix POD error. Closes: #480191 * dh: Typo fixes. Closes: #480200 * dh: Add remove_command to the sequence interface. + * dh_auto_clean: setup.py clean can create pyc files. Remove. Closes: #481899 -- Joey Hess Mon, 05 May 2008 18:53:10 -0400 diff --git a/dh_auto_clean b/dh_auto_clean index 4468fef..1303570 100755 --- a/dh_auto_clean +++ b/dh_auto_clean @@ -55,6 +55,9 @@ if (-e "Makefile" || -e "makefile" || -e "GNUmakefile") { } elsif (-e "setup.py") { doit("python", "setup.py", "clean", "-a", @{$dh{U_PARAMS}}); + # The setup.py might import files, leading to python creating pyc + # files. + doit('find', '.', '-name', '*.pyc', '-exec', 'rm', '{}', ';'); } elsif (-e "Build.PL" && -e "Build") { doit("perl", "Build", "--allow_mb_mismatch", 1, "distclean", @{$dh{U_PARAMS}}); -- 2.39.5