mirror of
https://github.com/kennethreitz-archive/python-build.git
synced 2026-06-05 23:30:18 +00:00
update 0.5
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
import os
|
||||
from pythonbrew.basecommand import Command
|
||||
from pythonbrew.define import PATH_BUILD, PATH_DISTS
|
||||
from pythonbrew.util import rm_r
|
||||
|
||||
class CleanCommand(Command):
|
||||
name = "clean"
|
||||
usage = "%prog"
|
||||
summary = "Remove stale source folders and archives"
|
||||
|
||||
def run_command(self, options, args):
|
||||
self._clean(PATH_BUILD)
|
||||
self._clean(PATH_DISTS)
|
||||
|
||||
def _clean(self, root):
|
||||
for dir in os.listdir(root):
|
||||
rm_r("%s/%s" % (root, dir))
|
||||
|
||||
CleanCommand()
|
||||
Reference in New Issue
Block a user