[pypy-svn] r16567 - pypy/dist/pypy/tool
hpk at codespeak.net
hpk at codespeak.net
Fri Aug 26 10:33:49 CEST 2005
Author: hpk
Date: Fri Aug 26 10:33:48 2005
New Revision: 16567
Modified:
pypy/dist/pypy/tool/genstatistic.py
Log:
exclude certain dirs for subdir-details as well
Modified: pypy/dist/pypy/tool/genstatistic.py
==============================================================================
--- pypy/dist/pypy/tool/genstatistic.py (original)
+++ pypy/dist/pypy/tool/genstatistic.py Fri Aug 26 10:33:48 2005
@@ -28,19 +28,20 @@
def isfile(p):
return p.check(file=1) and p.ext in ('.py', '.txt', '')
+def recpypy(p):
+ if p.basename[0] == '.':
+ return False
+ if p.basename in ('Pyrex',
+ '_cache',
+ 'unicodedata',
+ 'pypy-translation-snapshot'):
+ return False
+ return True
+
def getpypycounter():
- def rec(p):
- if p.basename[0] == '.':
- return False
- if p.basename in ('Pyrex',
- '_cache',
- 'unicodedata',
- 'pypy-translation-snapshot'):
- return False
- return True
filecounter = countloc.FileCounter()
root = py.path.local(autopath.pypydir)
- filecounter.addrecursive(root, isfile, rec=rec)
+ filecounter.addrecursive(root, isfile, rec=recpypy)
return filecounter
class CounterModel:
@@ -103,7 +104,7 @@
continue
if p.check(dir=1):
counter = countloc.FileCounter()
- counter.addrecursive(p, isfile)
+ counter.addrecursive(p, isfile, recpypy)
model = CounterModel(counter)
t.append(row(html.h2(p.relto(pypydir.dirpath()))))
t.append(viewlocsummary(model))
More information about the Pypy-commit
mailing list