Merge branch 'feature/inherit-clean' of https://github.com/DanLipsitt/OctoPrint into improve/cleanCommand

This commit is contained in:
Gina Häußge 2017-03-09 18:40:09 +01:00
commit 052796d5d2

View file

@ -10,6 +10,7 @@ import shutil
import glob
from setuptools import Command
from distutils.command.clean import clean as _clean
def package_data_dirs(source, sub_folders):
@ -50,7 +51,7 @@ def recursively_handle_files(directory, file_matcher, folder_matcher=None, folde
return applied_handler
class CleanCommand(Command):
class CleanCommand(_clean):
description = "clean build artifacts"
user_options = []
boolean_options = []
@ -76,6 +77,8 @@ class CleanCommand(Command):
pass
def run(self):
_clean.run(self)
# build folder
if os.path.exists(self.__class__.build_folder):
print("Deleting build directory")