How could I make my setup.py
pre-delete and post-delete the build directory?
views:
197answers:
2
+1
A:
For pre-deletion, just delete it with distutils.dir_util.remove_tree
before calling setup.
For post-delete, I assume you only want to post-delete after selected commands. Subclass the respective command, override its run method (to invoke remove_tree after calling the base run), and pass the new command into the cmdclass dictionary of setup.
Martin v. Löwis
2009-10-20 14:13:42