def project_clean(): rimraf('build') rimraf('dist') rimraf('temp') rimraf('*.egg') rimraf('*.egg-info/') rimraf('*.pyc') rimraf('__pycache__') for path_ in ['findd', 'tests']: for root, dirs, files in os.walk(path_): rimraf(os.path.join(root, '*.pyc')) if '__pycache__' in dirs: rimraf(os.path.join(root, '__pycache__')) dirs.remove('__pycache__')
def coverage_clean(): rimraf('.coverage') rimraf('.coverage.*') rimraf('htmlcov') run('coverage erase')