From 25d930b3076b84f13022c1ff5110c5aceb637d55 Mon Sep 17 00:00:00 2001 From: Calum Lind Date: Mon, 9 Jan 2012 19:58:37 +0000 Subject: Fix #1929 : Update setup.py to clean deluge*.egg_info dir from root dir --- setup.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) mode change 100644 => 100755 setup.py diff --git a/setup.py b/setup.py old mode 100644 new mode 100755 index f5d26fb22..5b0183c9b --- a/setup.py +++ b/setup.py @@ -17,9 +17,9 @@ # # You should have received a copy of the GNU General Public License # along with this program. If not, write to: -# The Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor -# Boston, MA 02110-1301, USA. +# The Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor +# Boston, MA 02110-1301, USA. # try: @@ -450,6 +450,14 @@ class clean_plugins(cmd.Command): os.remove(os.path.join(path, fpath)) 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): sub_commands = _clean.sub_commands + [('clean_plugins', None)] -- cgit