Skip to content

Commit 8546776

Browse files
committed
BUG: restore setup.py clean functionality
Proper implementation of the clean command.
1 parent 4ee4fe6 commit 8546776

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

setup.py

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import sys
99
import os
1010
import shutil
11-
from distutils.core import Command
11+
from distutils.command.clean import clean as Clean
1212

1313
if sys.version_info[0] < 3:
1414
import __builtin__ as builtins
@@ -56,18 +56,11 @@
5656

5757
###############################################################################
5858

59-
class CleanCommand(Command):
59+
class CleanCommand(Clean):
6060
description = "Remove build directories, and compiled file in the source tree"
61-
user_options = []
62-
63-
def initialize_options(self):
64-
self.cwd = None
65-
66-
def finalize_options(self):
67-
self.cwd = os.getcwd()
6861

6962
def run(self):
70-
assert os.getcwd() == self.cwd, 'Must be in package root: %s' % self.cwd
63+
Clean.run(self)
7164
if os.path.exists('build'):
7265
shutil.rmtree('build')
7366
for dirpath, dirnames, filenames in os.walk('sklearn'):

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy