def wrapper(fn):

    def wrapped(src, *args, **kwargs):
        if not re.search('/\\.git/?', src):
            fn(src, *args, **kwargs)
return wrapped
py2app picking up .git subdir of a package during build