modification to setup.py to allow for subdirs in plugins

This commit is contained in:
Zach Tibbitts 2007-09-28 01:45:03 +00:00
parent b02ef923ff
commit 0858836a67

View file

@ -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,