Fix #1929 : Update setup.py to clean deluge*.egg_info dir from root dir

This commit is contained in:
Calum Lind 2012-01-09 19:58:37 +00:00
parent 083c7fbb32
commit 25d930b307
1 changed files with 11 additions and 3 deletions

14
setup.py Normal file → Executable file
View File

@ -17,9 +17,9 @@
# #
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, write to: # along with this program. If not, write to:
# The Free Software Foundation, Inc., # The Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor # 51 Franklin Street, Fifth Floor
# Boston, MA 02110-1301, USA. # Boston, MA 02110-1301, USA.
# #
try: try:
@ -450,6 +450,14 @@ class clean_plugins(cmd.Command):
os.remove(os.path.join(path, fpath)) os.remove(os.path.join(path, fpath))
os.removedirs(path) os.removedirs(path)
ROOT_EGG_INFO_DIR_PATH = "deluge*.egg-info"
for path in glob.glob(ROOT_EGG_INFO_DIR_PATH):
print("Deleting %s" % path)
for fpath in os.listdir(path):
os.remove(os.path.join(path, fpath))
os.removedirs(path)
class clean(_clean): class clean(_clean):
sub_commands = _clean.sub_commands + [('clean_plugins', None)] sub_commands = _clean.sub_commands + [('clean_plugins', None)]