Browse Source

pavement: removepyc now also removes Jython compiled classes

Ask Solem 14 years ago
parent
commit
7e804bbcf2
1 changed files with 4 additions and 1 deletions
  1. 4 1
      pavement.py

+ 4 - 1
pavement.py

@@ -3,6 +3,8 @@ from paver.easy import *
 from paver import doctools
 from paver.setuputils import setup
 
+PYCOMPILE_CACHES = ["*.pyc", "*$py.class"]
+
 options(
         sphinx=Bunch(builddir=".build"),
 )
@@ -134,7 +136,8 @@ def pep8(options):
 
 @task
 def removepyc(options):
-    sh("find . -name '*.pyc' | xargs rm")
+    sh("find . -type f -a \\( %s \\) | xargs rm" % (
+        " -o ".join("-name '%s'" % (pat, ) for pat in PYCOMPILE_CACHES), ))
 
 
 @task