diff --git a/setup.py b/setup.py
index 5f27b193a266ccf27dd12556caa705bff2e2d8d2..b50a0c85dea6c1b69fc4b602625ee2a703f8c6b0 100755
--- a/setup.py
+++ b/setup.py
@@ -8,7 +8,7 @@ descr = """A set of python modules for machine learning and data mining"""
 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
@@ -56,18 +56,11 @@ else:
 
 ###############################################################################
 
-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'):