diff --git a/setup.py b/setup.py index 4b4038a7d306..35f2f42e6aab 100644 --- a/setup.py +++ b/setup.py @@ -139,6 +139,12 @@ def run(self): "'python setup.py test'. Please run 'python tests.py'") +class NoopCleanCommand(TestCommand): + def run(self): + print("Matplotlib does not support 'python setup.py clean' " + "Please use 'git clean' or manually delete the build folder.") + + class BuildExtraLibraries(BuildExtCommand): def run(self): for package in good_packages: @@ -149,6 +155,7 @@ def run(self): cmdclass = versioneer.get_cmdclass() cmdclass['test'] = NoopTestCommand +cmdclass['clean'] = NoopCleanCommand cmdclass['build_ext'] = BuildExtraLibraries # One doesn't normally see `if __name__ == '__main__'` blocks in a setup.py,