Skip to content

Commit

Permalink
BUG: restore setup.py clean functionality
Browse files Browse the repository at this point in the history
Proper implementation of the clean command.
  • Loading branch information
GaelVaroquaux committed Aug 21, 2013
1 parent d334176 commit e7a9331
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import sys
import os
import shutil
from distutils.core import Command
from distutils.command.clean import clean as Clean

if sys.version_info[0] < 3:
import __builtin__ as builtins
Expand Down Expand Up @@ -56,18 +56,11 @@

###############################################################################

class CleanCommand(Command):
class CleanCommand(Clean):
description = "Remove build directories, and compiled file in the source tree"
user_options = []

def initialize_options(self):
self.cwd = None

def finalize_options(self):
self.cwd = os.getcwd()

def run(self):
assert os.getcwd() == self.cwd, 'Must be in package root: %s' % self.cwd
Clean.run(self)
if os.path.exists('build'):
shutil.rmtree('build')
for dirpath, dirnames, filenames in os.walk('sklearn'):
Expand Down

0 comments on commit e7a9331

Please sign in to comment.