From 0858836a67d0cb38841aff5947c563fb18704c06 Mon Sep 17 00:00:00 2001 From: Zach Tibbitts Date: Fri, 28 Sep 2007 01:45:03 +0000 Subject: [PATCH] modification to setup.py to allow for subdirs in plugins --- setup.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index f0dcf3a96..f713c9c81 100644 --- a/setup.py +++ b/setup.py @@ -364,8 +364,15 @@ data = [('share/deluge/glade', glob.glob('glade/*.glade')), ('share/applications' , ['deluge.desktop']), ('share/pixmaps' , ['deluge.png'])] -for plugin in glob.glob('plugins/*'): - data.append( ('share/deluge/' + plugin, glob.glob(plugin + '/*')) ) +# New code to glob plugins and include subdirs: +for o in os.walk('plugins'): + path = o[0] + if not path.count('/.'): + items = o[2] + for x in range(len(items)): + items[x] = path + '/' + items[x] + data.append( ('share/deluge/' + path, items)) + #data.append( ('share/deluge/' + plugin, glob.glob(plugin + '/*')) ) setup(name=NAME, fullname=FULLNAME, version=VERSION, author=AUTHOR, author_email=EMAIL, description=DESCRIPTION,