From c1640137250b228cd42cc395f791fa0700fff6e6 Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Fri, 10 Dec 2010 04:31:51 +0000 Subject: [PATCH] Ported Feeder(although not working on current deluge), Notifications, Scheduler, Stats, Toggle and WebUi to the deluge.plugins namespace. --- deluge/plugins/Feeder/deluge/__init__.py | 3 +++ deluge/plugins/Feeder/deluge/plugins/__init__.py | 3 +++ .../deluge/plugins}/feeder/__init__.py | 0 .../deluge/plugins}/feeder/core.py | 0 .../deluge/plugins}/feeder/template/feeds.html | 0 .../plugins}/feeder/template/filter_settings.html | 0 .../deluge/plugins}/feeder/template/filters.html | 0 .../deluge/plugins}/feeder/webui.py | 0 deluge/plugins/{feeder => Feeder}/setup.py | 13 +++++++------ .../create_dev_link.sh | 0 deluge/plugins/Notifications/deluge/__init__.py | 3 +++ .../Notifications/deluge/plugins/__init__.py | 3 +++ .../deluge/plugins}/notifications/__init__.py | 0 .../deluge/plugins}/notifications/common.py | 2 +- .../deluge/plugins}/notifications/core.py | 2 +- .../plugins}/notifications/data/config.glade | 0 .../plugins}/notifications/data/notifications.js | 0 .../deluge/plugins}/notifications/gtkui.py | 0 .../deluge/plugins}/notifications/test.py | 0 .../deluge/plugins}/notifications/webui.py | 0 .../{notifications => Notifications}/setup.py | 7 ++++--- deluge/plugins/Scheduler/deluge/__init__.py | 3 +++ .../plugins/Scheduler/deluge/plugins/__init__.py | 3 +++ .../deluge/plugins}/scheduler/__init__.py | 0 .../deluge/plugins}/scheduler/common.py | 3 ++- .../deluge/plugins}/scheduler/core.py | 0 .../deluge/plugins}/scheduler/data/green.png | Bin .../deluge/plugins}/scheduler/data/red.png | Bin .../deluge/plugins}/scheduler/data/scheduler.js | 0 .../deluge/plugins}/scheduler/data/yellow.png | Bin .../deluge/plugins}/scheduler/gtkui.py | 0 .../deluge/plugins}/scheduler/webui.py | 4 ++-- deluge/plugins/{scheduler => Scheduler}/setup.py | 13 +++++++------ deluge/plugins/{stats => Stats}/create_dev_link.sh | 0 deluge/plugins/Stats/deluge/__init__.py | 3 +++ deluge/plugins/Stats/deluge/plugins/__init__.py | 3 +++ .../deluge/plugins}/stats/__init__.py | 0 .../deluge/plugins}/stats/common.py | 3 ++- .../{stats => Stats/deluge/plugins}/stats/core.py | 0 .../deluge/plugins}/stats/data/config.glade | 0 .../deluge/plugins}/stats/data/stats.js | 0 .../deluge/plugins}/stats/data/tabs.glade | 0 .../{stats => Stats/deluge/plugins}/stats/graph.py | 0 .../{stats => Stats/deluge/plugins}/stats/gtkui.py | 0 .../deluge/plugins}/stats/test.html | 0 .../{stats => Stats/deluge/plugins}/stats/test.py | 0 .../{stats => Stats/deluge/plugins}/stats/test.sh | 0 .../deluge/plugins}/stats/test_total.py | 0 .../{stats => Stats/deluge/plugins}/stats/webui.py | 0 deluge/plugins/{stats => Stats}/setup.py | 13 +++++++------ deluge/plugins/Toggle/deluge/__init__.py | 3 +++ deluge/plugins/Toggle/deluge/plugins/__init__.py | 3 +++ .../deluge/plugins}/toggle/__init__.py | 0 .../deluge/plugins}/toggle/common.py | 3 ++- .../deluge/plugins}/toggle/core.py | 0 .../deluge/plugins}/toggle/data/toggle.js | 0 .../deluge/plugins}/toggle/gtkui.py | 0 .../deluge/plugins}/toggle/webui.py | 0 deluge/plugins/{toggle => Toggle}/setup.py | 13 +++++++------ deluge/plugins/{webui => WebUi}/create_dev_link.sh | 0 deluge/plugins/WebUi/deluge/__init__.py | 3 +++ deluge/plugins/WebUi/deluge/plugins/__init__.py | 3 +++ .../deluge/plugins}/webui/__init__.py | 0 .../deluge/plugins}/webui/common.py | 3 ++- .../{webui => WebUi/deluge/plugins}/webui/core.py | 0 .../deluge/plugins}/webui/data/config.glade | 0 .../{webui => WebUi/deluge/plugins}/webui/gtkui.py | 0 deluge/plugins/{webui => WebUi}/setup.py | 11 ++++++----- deluge/scripts/create_plugin.py | 1 + 69 files changed, 87 insertions(+), 40 deletions(-) create mode 100644 deluge/plugins/Feeder/deluge/__init__.py create mode 100644 deluge/plugins/Feeder/deluge/plugins/__init__.py rename deluge/plugins/{feeder => Feeder/deluge/plugins}/feeder/__init__.py (100%) rename deluge/plugins/{feeder => Feeder/deluge/plugins}/feeder/core.py (100%) rename deluge/plugins/{feeder => Feeder/deluge/plugins}/feeder/template/feeds.html (100%) rename deluge/plugins/{feeder => Feeder/deluge/plugins}/feeder/template/filter_settings.html (100%) rename deluge/plugins/{feeder => Feeder/deluge/plugins}/feeder/template/filters.html (100%) rename deluge/plugins/{feeder => Feeder/deluge/plugins}/feeder/webui.py (100%) rename deluge/plugins/{feeder => Feeder}/setup.py (86%) rename deluge/plugins/{notifications => Notifications}/create_dev_link.sh (100%) create mode 100644 deluge/plugins/Notifications/deluge/__init__.py create mode 100644 deluge/plugins/Notifications/deluge/plugins/__init__.py rename deluge/plugins/{notifications => Notifications/deluge/plugins}/notifications/__init__.py (100%) rename deluge/plugins/{notifications => Notifications/deluge/plugins}/notifications/common.py (98%) rename deluge/plugins/{notifications => Notifications/deluge/plugins}/notifications/core.py (99%) rename deluge/plugins/{notifications => Notifications/deluge/plugins}/notifications/data/config.glade (100%) rename deluge/plugins/{notifications => Notifications/deluge/plugins}/notifications/data/notifications.js (100%) rename deluge/plugins/{notifications => Notifications/deluge/plugins}/notifications/gtkui.py (100%) rename deluge/plugins/{notifications => Notifications/deluge/plugins}/notifications/test.py (100%) rename deluge/plugins/{notifications => Notifications/deluge/plugins}/notifications/webui.py (100%) rename deluge/plugins/{notifications => Notifications}/setup.py (92%) create mode 100644 deluge/plugins/Scheduler/deluge/__init__.py create mode 100644 deluge/plugins/Scheduler/deluge/plugins/__init__.py rename deluge/plugins/{scheduler => Scheduler/deluge/plugins}/scheduler/__init__.py (100%) rename deluge/plugins/{scheduler => Scheduler/deluge/plugins}/scheduler/common.py (91%) rename deluge/plugins/{scheduler => Scheduler/deluge/plugins}/scheduler/core.py (100%) rename deluge/plugins/{scheduler => Scheduler/deluge/plugins}/scheduler/data/green.png (100%) rename deluge/plugins/{scheduler => Scheduler/deluge/plugins}/scheduler/data/red.png (100%) rename deluge/plugins/{scheduler => Scheduler/deluge/plugins}/scheduler/data/scheduler.js (100%) rename deluge/plugins/{scheduler => Scheduler/deluge/plugins}/scheduler/data/yellow.png (100%) rename deluge/plugins/{scheduler => Scheduler/deluge/plugins}/scheduler/gtkui.py (100%) rename deluge/plugins/{scheduler => Scheduler/deluge/plugins}/scheduler/webui.py (97%) rename deluge/plugins/{scheduler => Scheduler}/setup.py (87%) rename deluge/plugins/{stats => Stats}/create_dev_link.sh (100%) create mode 100644 deluge/plugins/Stats/deluge/__init__.py create mode 100644 deluge/plugins/Stats/deluge/plugins/__init__.py rename deluge/plugins/{stats => Stats/deluge/plugins}/stats/__init__.py (100%) rename deluge/plugins/{stats => Stats/deluge/plugins}/stats/common.py (91%) rename deluge/plugins/{stats => Stats/deluge/plugins}/stats/core.py (100%) rename deluge/plugins/{stats => Stats/deluge/plugins}/stats/data/config.glade (100%) rename deluge/plugins/{stats => Stats/deluge/plugins}/stats/data/stats.js (100%) rename deluge/plugins/{stats => Stats/deluge/plugins}/stats/data/tabs.glade (100%) rename deluge/plugins/{stats => Stats/deluge/plugins}/stats/graph.py (100%) rename deluge/plugins/{stats => Stats/deluge/plugins}/stats/gtkui.py (100%) rename deluge/plugins/{stats => Stats/deluge/plugins}/stats/test.html (100%) rename deluge/plugins/{stats => Stats/deluge/plugins}/stats/test.py (100%) rename deluge/plugins/{stats => Stats/deluge/plugins}/stats/test.sh (100%) rename deluge/plugins/{stats => Stats/deluge/plugins}/stats/test_total.py (100%) rename deluge/plugins/{stats => Stats/deluge/plugins}/stats/webui.py (100%) rename deluge/plugins/{stats => Stats}/setup.py (89%) create mode 100644 deluge/plugins/Toggle/deluge/__init__.py create mode 100644 deluge/plugins/Toggle/deluge/plugins/__init__.py rename deluge/plugins/{toggle => Toggle/deluge/plugins}/toggle/__init__.py (100%) rename deluge/plugins/{toggle => Toggle/deluge/plugins}/toggle/common.py (92%) rename deluge/plugins/{toggle => Toggle/deluge/plugins}/toggle/core.py (100%) rename deluge/plugins/{toggle => Toggle/deluge/plugins}/toggle/data/toggle.js (100%) rename deluge/plugins/{toggle => Toggle/deluge/plugins}/toggle/gtkui.py (100%) rename deluge/plugins/{toggle => Toggle/deluge/plugins}/toggle/webui.py (100%) rename deluge/plugins/{toggle => Toggle}/setup.py (87%) rename deluge/plugins/{webui => WebUi}/create_dev_link.sh (100%) create mode 100644 deluge/plugins/WebUi/deluge/__init__.py create mode 100644 deluge/plugins/WebUi/deluge/plugins/__init__.py rename deluge/plugins/{webui => WebUi/deluge/plugins}/webui/__init__.py (100%) rename deluge/plugins/{webui => WebUi/deluge/plugins}/webui/common.py (91%) rename deluge/plugins/{webui => WebUi/deluge/plugins}/webui/core.py (100%) rename deluge/plugins/{webui => WebUi/deluge/plugins}/webui/data/config.glade (100%) rename deluge/plugins/{webui => WebUi/deluge/plugins}/webui/gtkui.py (100%) rename deluge/plugins/{webui => WebUi}/setup.py (88%) diff --git a/deluge/plugins/Feeder/deluge/__init__.py b/deluge/plugins/Feeder/deluge/__init__.py new file mode 100644 index 000000000..94033e829 --- /dev/null +++ b/deluge/plugins/Feeder/deluge/__init__.py @@ -0,0 +1,3 @@ +# this is a namespace package +import pkg_resources +pkg_resources.declare_namespace(__name__) diff --git a/deluge/plugins/Feeder/deluge/plugins/__init__.py b/deluge/plugins/Feeder/deluge/plugins/__init__.py new file mode 100644 index 000000000..94033e829 --- /dev/null +++ b/deluge/plugins/Feeder/deluge/plugins/__init__.py @@ -0,0 +1,3 @@ +# this is a namespace package +import pkg_resources +pkg_resources.declare_namespace(__name__) diff --git a/deluge/plugins/feeder/feeder/__init__.py b/deluge/plugins/Feeder/deluge/plugins/feeder/__init__.py similarity index 100% rename from deluge/plugins/feeder/feeder/__init__.py rename to deluge/plugins/Feeder/deluge/plugins/feeder/__init__.py diff --git a/deluge/plugins/feeder/feeder/core.py b/deluge/plugins/Feeder/deluge/plugins/feeder/core.py similarity index 100% rename from deluge/plugins/feeder/feeder/core.py rename to deluge/plugins/Feeder/deluge/plugins/feeder/core.py diff --git a/deluge/plugins/feeder/feeder/template/feeds.html b/deluge/plugins/Feeder/deluge/plugins/feeder/template/feeds.html similarity index 100% rename from deluge/plugins/feeder/feeder/template/feeds.html rename to deluge/plugins/Feeder/deluge/plugins/feeder/template/feeds.html diff --git a/deluge/plugins/feeder/feeder/template/filter_settings.html b/deluge/plugins/Feeder/deluge/plugins/feeder/template/filter_settings.html similarity index 100% rename from deluge/plugins/feeder/feeder/template/filter_settings.html rename to deluge/plugins/Feeder/deluge/plugins/feeder/template/filter_settings.html diff --git a/deluge/plugins/feeder/feeder/template/filters.html b/deluge/plugins/Feeder/deluge/plugins/feeder/template/filters.html similarity index 100% rename from deluge/plugins/feeder/feeder/template/filters.html rename to deluge/plugins/Feeder/deluge/plugins/feeder/template/filters.html diff --git a/deluge/plugins/feeder/feeder/webui.py b/deluge/plugins/Feeder/deluge/plugins/feeder/webui.py similarity index 100% rename from deluge/plugins/feeder/feeder/webui.py rename to deluge/plugins/Feeder/deluge/plugins/feeder/webui.py diff --git a/deluge/plugins/feeder/setup.py b/deluge/plugins/Feeder/setup.py similarity index 86% rename from deluge/plugins/feeder/setup.py rename to deluge/plugins/Feeder/setup.py index 4c4a09f8e..a2bd9bf80 100644 --- a/deluge/plugins/feeder/setup.py +++ b/deluge/plugins/Feeder/setup.py @@ -34,7 +34,7 @@ # but you are not obligated to do so. If you do not wish to do so, delete # this exception statement from your version. If you delete this exception -from setuptools import setup +from setuptools import setup, find_packages __plugin_name__ = "feeder" __author__ = "Fredrik Eriksson" @@ -44,7 +44,7 @@ __url__ = "" __license__ = "GPLv3" __description__ = "A plugin for automatically downloadning torrents from a RSS-feed" __long_description__ = """""" -__pkg_data__ = {__plugin_name__.lower(): ["template/*", "data/*"]} +__pkg_data__ = {"deluge.plugins."+__plugin_name__.lower(): ["template/*", "data/*"]} setup( name=__plugin_name__, @@ -56,15 +56,16 @@ setup( license=__license__, long_description=__long_description__, - packages=[__plugin_name__.lower()], + packages=find_packages(), + namespace_packages = ["deluge", "deluge.plugins"], package_data = __pkg_data__, entry_points=""" [deluge.plugin.core] - %s = %s:CorePlugin + %s = deluge.plugins.%s:CorePlugin [deluge.plugin.gtkui] - %s = %s:GtkUIPlugin + %s = deluge.plugins.%s:GtkUIPlugin [deluge.plugin.webui] - %s = %s:WebUIPlugin + %s = deluge.plugins.%s:WebUIPlugin """ % ((__plugin_name__, __plugin_name__.lower())*3) ) diff --git a/deluge/plugins/notifications/create_dev_link.sh b/deluge/plugins/Notifications/create_dev_link.sh similarity index 100% rename from deluge/plugins/notifications/create_dev_link.sh rename to deluge/plugins/Notifications/create_dev_link.sh diff --git a/deluge/plugins/Notifications/deluge/__init__.py b/deluge/plugins/Notifications/deluge/__init__.py new file mode 100644 index 000000000..94033e829 --- /dev/null +++ b/deluge/plugins/Notifications/deluge/__init__.py @@ -0,0 +1,3 @@ +# this is a namespace package +import pkg_resources +pkg_resources.declare_namespace(__name__) diff --git a/deluge/plugins/Notifications/deluge/plugins/__init__.py b/deluge/plugins/Notifications/deluge/plugins/__init__.py new file mode 100644 index 000000000..94033e829 --- /dev/null +++ b/deluge/plugins/Notifications/deluge/plugins/__init__.py @@ -0,0 +1,3 @@ +# this is a namespace package +import pkg_resources +pkg_resources.declare_namespace(__name__) diff --git a/deluge/plugins/notifications/notifications/__init__.py b/deluge/plugins/Notifications/deluge/plugins/notifications/__init__.py similarity index 100% rename from deluge/plugins/notifications/notifications/__init__.py rename to deluge/plugins/Notifications/deluge/plugins/notifications/__init__.py diff --git a/deluge/plugins/notifications/notifications/common.py b/deluge/plugins/Notifications/deluge/plugins/notifications/common.py similarity index 98% rename from deluge/plugins/notifications/notifications/common.py rename to deluge/plugins/Notifications/deluge/plugins/notifications/common.py index 7353e5a8e..337a9a6aa 100644 --- a/deluge/plugins/notifications/notifications/common.py +++ b/deluge/plugins/Notifications/deluge/plugins/notifications/common.py @@ -50,7 +50,7 @@ except ImportError: def get_resource(filename): import pkg_resources, os - return pkg_resources.resource_filename("notifications", + return pkg_resources.resource_filename("deluge.plugins.notifications", os.path.join("data", filename)) diff --git a/deluge/plugins/notifications/notifications/core.py b/deluge/plugins/Notifications/deluge/plugins/notifications/core.py similarity index 99% rename from deluge/plugins/notifications/notifications/core.py rename to deluge/plugins/Notifications/deluge/plugins/notifications/core.py index 9586f7f5f..f4b9075ca 100644 --- a/deluge/plugins/notifications/notifications/core.py +++ b/deluge/plugins/Notifications/deluge/plugins/notifications/core.py @@ -46,7 +46,7 @@ from deluge.plugins.pluginbase import CorePluginBase import deluge.configmanager from deluge.core.rpcserver import export -from notifications.common import CustomNotifications +from common import CustomNotifications DEFAULT_PREFS = { "smtp_enabled": False, diff --git a/deluge/plugins/notifications/notifications/data/config.glade b/deluge/plugins/Notifications/deluge/plugins/notifications/data/config.glade similarity index 100% rename from deluge/plugins/notifications/notifications/data/config.glade rename to deluge/plugins/Notifications/deluge/plugins/notifications/data/config.glade diff --git a/deluge/plugins/notifications/notifications/data/notifications.js b/deluge/plugins/Notifications/deluge/plugins/notifications/data/notifications.js similarity index 100% rename from deluge/plugins/notifications/notifications/data/notifications.js rename to deluge/plugins/Notifications/deluge/plugins/notifications/data/notifications.js diff --git a/deluge/plugins/notifications/notifications/gtkui.py b/deluge/plugins/Notifications/deluge/plugins/notifications/gtkui.py similarity index 100% rename from deluge/plugins/notifications/notifications/gtkui.py rename to deluge/plugins/Notifications/deluge/plugins/notifications/gtkui.py diff --git a/deluge/plugins/notifications/notifications/test.py b/deluge/plugins/Notifications/deluge/plugins/notifications/test.py similarity index 100% rename from deluge/plugins/notifications/notifications/test.py rename to deluge/plugins/Notifications/deluge/plugins/notifications/test.py diff --git a/deluge/plugins/notifications/notifications/webui.py b/deluge/plugins/Notifications/deluge/plugins/notifications/webui.py similarity index 100% rename from deluge/plugins/notifications/notifications/webui.py rename to deluge/plugins/Notifications/deluge/plugins/notifications/webui.py diff --git a/deluge/plugins/notifications/setup.py b/deluge/plugins/Notifications/setup.py similarity index 92% rename from deluge/plugins/notifications/setup.py rename to deluge/plugins/Notifications/setup.py index b7098e22c..e94589e37 100755 --- a/deluge/plugins/notifications/setup.py +++ b/deluge/plugins/Notifications/setup.py @@ -51,7 +51,7 @@ __long_description__ = __description__ + """\ The plugin also allows other plugins to make use of itself for their own custom notifications. """ -__pkg_data__ = {__plugin_name__.lower(): ["template/*", "data/*"]} +__pkg_data__ = {"deluge.plugins."+__plugin_name__.lower(): ["template/*", "data/*"]} setup( name=__plugin_name__, @@ -64,12 +64,13 @@ setup( long_description=__long_description__ if __long_description__ else __description__, packages=find_packages(exclude=['**/test.py']), + namespace_packages = ["deluge", "deluge.plugins"], package_data = __pkg_data__, entry_points=""" [deluge.plugin.core] - %s = %s:CorePlugin + %s = deluge.plugins.%s:CorePlugin [deluge.plugin.gtkui] - %s = %s:GtkUIPlugin + %s = deluge.plugins.%s:GtkUIPlugin """ % ((__plugin_name__, __plugin_name__.lower())*2) ) diff --git a/deluge/plugins/Scheduler/deluge/__init__.py b/deluge/plugins/Scheduler/deluge/__init__.py new file mode 100644 index 000000000..94033e829 --- /dev/null +++ b/deluge/plugins/Scheduler/deluge/__init__.py @@ -0,0 +1,3 @@ +# this is a namespace package +import pkg_resources +pkg_resources.declare_namespace(__name__) diff --git a/deluge/plugins/Scheduler/deluge/plugins/__init__.py b/deluge/plugins/Scheduler/deluge/plugins/__init__.py new file mode 100644 index 000000000..94033e829 --- /dev/null +++ b/deluge/plugins/Scheduler/deluge/plugins/__init__.py @@ -0,0 +1,3 @@ +# this is a namespace package +import pkg_resources +pkg_resources.declare_namespace(__name__) diff --git a/deluge/plugins/scheduler/scheduler/__init__.py b/deluge/plugins/Scheduler/deluge/plugins/scheduler/__init__.py similarity index 100% rename from deluge/plugins/scheduler/scheduler/__init__.py rename to deluge/plugins/Scheduler/deluge/plugins/scheduler/__init__.py diff --git a/deluge/plugins/scheduler/scheduler/common.py b/deluge/plugins/Scheduler/deluge/plugins/scheduler/common.py similarity index 91% rename from deluge/plugins/scheduler/scheduler/common.py rename to deluge/plugins/Scheduler/deluge/plugins/scheduler/common.py index b2b184b23..5c495a5eb 100644 --- a/deluge/plugins/scheduler/scheduler/common.py +++ b/deluge/plugins/Scheduler/deluge/plugins/scheduler/common.py @@ -38,4 +38,5 @@ def get_resource(filename): import pkg_resources, os - return pkg_resources.resource_filename("scheduler", os.path.join("data", filename)) + return pkg_resources.resource_filename("deluge.plugins.scheduler", + os.path.join("data", filename)) diff --git a/deluge/plugins/scheduler/scheduler/core.py b/deluge/plugins/Scheduler/deluge/plugins/scheduler/core.py similarity index 100% rename from deluge/plugins/scheduler/scheduler/core.py rename to deluge/plugins/Scheduler/deluge/plugins/scheduler/core.py diff --git a/deluge/plugins/scheduler/scheduler/data/green.png b/deluge/plugins/Scheduler/deluge/plugins/scheduler/data/green.png similarity index 100% rename from deluge/plugins/scheduler/scheduler/data/green.png rename to deluge/plugins/Scheduler/deluge/plugins/scheduler/data/green.png diff --git a/deluge/plugins/scheduler/scheduler/data/red.png b/deluge/plugins/Scheduler/deluge/plugins/scheduler/data/red.png similarity index 100% rename from deluge/plugins/scheduler/scheduler/data/red.png rename to deluge/plugins/Scheduler/deluge/plugins/scheduler/data/red.png diff --git a/deluge/plugins/scheduler/scheduler/data/scheduler.js b/deluge/plugins/Scheduler/deluge/plugins/scheduler/data/scheduler.js similarity index 100% rename from deluge/plugins/scheduler/scheduler/data/scheduler.js rename to deluge/plugins/Scheduler/deluge/plugins/scheduler/data/scheduler.js diff --git a/deluge/plugins/scheduler/scheduler/data/yellow.png b/deluge/plugins/Scheduler/deluge/plugins/scheduler/data/yellow.png similarity index 100% rename from deluge/plugins/scheduler/scheduler/data/yellow.png rename to deluge/plugins/Scheduler/deluge/plugins/scheduler/data/yellow.png diff --git a/deluge/plugins/scheduler/scheduler/gtkui.py b/deluge/plugins/Scheduler/deluge/plugins/scheduler/gtkui.py similarity index 100% rename from deluge/plugins/scheduler/scheduler/gtkui.py rename to deluge/plugins/Scheduler/deluge/plugins/scheduler/gtkui.py diff --git a/deluge/plugins/scheduler/scheduler/webui.py b/deluge/plugins/Scheduler/deluge/plugins/scheduler/webui.py similarity index 97% rename from deluge/plugins/scheduler/scheduler/webui.py rename to deluge/plugins/Scheduler/deluge/plugins/scheduler/webui.py index 71cc8cc9a..f7f82d242 100644 --- a/deluge/plugins/scheduler/scheduler/webui.py +++ b/deluge/plugins/Scheduler/deluge/plugins/scheduler/webui.py @@ -44,5 +44,5 @@ from deluge.plugins.pluginbase import WebPluginBase from common import get_resource class WebUI(WebPluginBase): - - scripts = [get_resource("scheduler.js")] \ No newline at end of file + + scripts = [get_resource("scheduler.js")] diff --git a/deluge/plugins/scheduler/setup.py b/deluge/plugins/Scheduler/setup.py similarity index 87% rename from deluge/plugins/scheduler/setup.py rename to deluge/plugins/Scheduler/setup.py index 28d95d9ce..f113a1c88 100644 --- a/deluge/plugins/scheduler/setup.py +++ b/deluge/plugins/Scheduler/setup.py @@ -36,7 +36,7 @@ # statement from all source files in the program, then also delete it here. # -from setuptools import setup +from setuptools import setup, find_packages __plugin_name__ = "Scheduler" __author__ = "Andrew Resch" @@ -46,7 +46,7 @@ __url__ = "http://deluge-torrent.org" __license__ = "GPLv3" __description__ = "Schedule limits on a per-hour per-day basis." __long_description__ = """""" -__pkg_data__ = {__plugin_name__.lower(): ["template/*", "data/*"]} +__pkg_data__ = {"deluge.plugins."+__plugin_name__.lower(): ["template/*", "data/*"]} setup( name=__plugin_name__, @@ -58,15 +58,16 @@ setup( license=__license__, long_description=__long_description__ if __long_description__ else __description__, - packages=[__plugin_name__.lower()], + packages=find_packages(), + namespace_packages = ["deluge", "deluge.plugins"], package_data = __pkg_data__, entry_points=""" [deluge.plugin.core] - %s = %s:CorePlugin + %s = deluge.plugins.%s:CorePlugin [deluge.plugin.gtkui] - %s = %s:GtkUIPlugin + %s = deluge.plugins.%s:GtkUIPlugin [deluge.plugin.web] - %s = %s:WebUIPlugin + %s = deluge.plugins.%s:WebUIPlugin """ % ((__plugin_name__, __plugin_name__.lower())*3) ) diff --git a/deluge/plugins/stats/create_dev_link.sh b/deluge/plugins/Stats/create_dev_link.sh similarity index 100% rename from deluge/plugins/stats/create_dev_link.sh rename to deluge/plugins/Stats/create_dev_link.sh diff --git a/deluge/plugins/Stats/deluge/__init__.py b/deluge/plugins/Stats/deluge/__init__.py new file mode 100644 index 000000000..94033e829 --- /dev/null +++ b/deluge/plugins/Stats/deluge/__init__.py @@ -0,0 +1,3 @@ +# this is a namespace package +import pkg_resources +pkg_resources.declare_namespace(__name__) diff --git a/deluge/plugins/Stats/deluge/plugins/__init__.py b/deluge/plugins/Stats/deluge/plugins/__init__.py new file mode 100644 index 000000000..94033e829 --- /dev/null +++ b/deluge/plugins/Stats/deluge/plugins/__init__.py @@ -0,0 +1,3 @@ +# this is a namespace package +import pkg_resources +pkg_resources.declare_namespace(__name__) diff --git a/deluge/plugins/stats/stats/__init__.py b/deluge/plugins/Stats/deluge/plugins/stats/__init__.py similarity index 100% rename from deluge/plugins/stats/stats/__init__.py rename to deluge/plugins/Stats/deluge/plugins/stats/__init__.py diff --git a/deluge/plugins/stats/stats/common.py b/deluge/plugins/Stats/deluge/plugins/stats/common.py similarity index 91% rename from deluge/plugins/stats/stats/common.py rename to deluge/plugins/Stats/deluge/plugins/stats/common.py index 3a81eaaca..674d6f4b3 100644 --- a/deluge/plugins/stats/stats/common.py +++ b/deluge/plugins/Stats/deluge/plugins/stats/common.py @@ -36,4 +36,5 @@ import pkg_resources import os.path def get_resource(filename): - return pkg_resources.resource_filename("stats", os.path.join("data", filename)) + return pkg_resources.resource_filename("deluge.plugins.stats", + os.path.join("data", filename)) diff --git a/deluge/plugins/stats/stats/core.py b/deluge/plugins/Stats/deluge/plugins/stats/core.py similarity index 100% rename from deluge/plugins/stats/stats/core.py rename to deluge/plugins/Stats/deluge/plugins/stats/core.py diff --git a/deluge/plugins/stats/stats/data/config.glade b/deluge/plugins/Stats/deluge/plugins/stats/data/config.glade similarity index 100% rename from deluge/plugins/stats/stats/data/config.glade rename to deluge/plugins/Stats/deluge/plugins/stats/data/config.glade diff --git a/deluge/plugins/stats/stats/data/stats.js b/deluge/plugins/Stats/deluge/plugins/stats/data/stats.js similarity index 100% rename from deluge/plugins/stats/stats/data/stats.js rename to deluge/plugins/Stats/deluge/plugins/stats/data/stats.js diff --git a/deluge/plugins/stats/stats/data/tabs.glade b/deluge/plugins/Stats/deluge/plugins/stats/data/tabs.glade similarity index 100% rename from deluge/plugins/stats/stats/data/tabs.glade rename to deluge/plugins/Stats/deluge/plugins/stats/data/tabs.glade diff --git a/deluge/plugins/stats/stats/graph.py b/deluge/plugins/Stats/deluge/plugins/stats/graph.py similarity index 100% rename from deluge/plugins/stats/stats/graph.py rename to deluge/plugins/Stats/deluge/plugins/stats/graph.py diff --git a/deluge/plugins/stats/stats/gtkui.py b/deluge/plugins/Stats/deluge/plugins/stats/gtkui.py similarity index 100% rename from deluge/plugins/stats/stats/gtkui.py rename to deluge/plugins/Stats/deluge/plugins/stats/gtkui.py diff --git a/deluge/plugins/stats/stats/test.html b/deluge/plugins/Stats/deluge/plugins/stats/test.html similarity index 100% rename from deluge/plugins/stats/stats/test.html rename to deluge/plugins/Stats/deluge/plugins/stats/test.html diff --git a/deluge/plugins/stats/stats/test.py b/deluge/plugins/Stats/deluge/plugins/stats/test.py similarity index 100% rename from deluge/plugins/stats/stats/test.py rename to deluge/plugins/Stats/deluge/plugins/stats/test.py diff --git a/deluge/plugins/stats/stats/test.sh b/deluge/plugins/Stats/deluge/plugins/stats/test.sh similarity index 100% rename from deluge/plugins/stats/stats/test.sh rename to deluge/plugins/Stats/deluge/plugins/stats/test.sh diff --git a/deluge/plugins/stats/stats/test_total.py b/deluge/plugins/Stats/deluge/plugins/stats/test_total.py similarity index 100% rename from deluge/plugins/stats/stats/test_total.py rename to deluge/plugins/Stats/deluge/plugins/stats/test_total.py diff --git a/deluge/plugins/stats/stats/webui.py b/deluge/plugins/Stats/deluge/plugins/stats/webui.py similarity index 100% rename from deluge/plugins/stats/stats/webui.py rename to deluge/plugins/Stats/deluge/plugins/stats/webui.py diff --git a/deluge/plugins/stats/setup.py b/deluge/plugins/Stats/setup.py similarity index 89% rename from deluge/plugins/stats/setup.py rename to deluge/plugins/Stats/setup.py index e5ff10494..f84f76f8e 100644 --- a/deluge/plugins/stats/setup.py +++ b/deluge/plugins/Stats/setup.py @@ -45,7 +45,7 @@ # but you are not obligated to do so. If you do not wish to do so, delete # this exception statement from your version. If you delete this exception -from setuptools import setup +from setuptools import setup, find_packages __plugin_name__ = "Stats" __author__ = "Martijn Voncken" @@ -55,7 +55,7 @@ __url__ = "http://deluge-torrent.org" __license__ = "GPLv3" __description__ = "" __long_description__ = """""" -__pkg_data__ = {__plugin_name__.lower(): ["template/*", "data/*"]} +__pkg_data__ = {"deluge.plugins."+__plugin_name__.lower(): ["template/*", "data/*"]} setup( name=__plugin_name__, @@ -67,15 +67,16 @@ setup( license=__license__, long_description=__long_description__, - packages=[__plugin_name__.lower()], + packages=find_packages(), + namespace_packages = ["deluge", "deluge.plugins"], package_data = __pkg_data__, entry_points=""" [deluge.plugin.core] - %s = %s:CorePlugin + %s = deluge.plugins.%s:CorePlugin [deluge.plugin.gtkui] - %s = %s:GtkUIPlugin + %s = deluge.plugins.%s:GtkUIPlugin [deluge.plugin.web] - %s = %s:WebUIPlugin + %s = deluge.plugins.%s:WebUIPlugin """ % ((__plugin_name__, __plugin_name__.lower())*3) ) diff --git a/deluge/plugins/Toggle/deluge/__init__.py b/deluge/plugins/Toggle/deluge/__init__.py new file mode 100644 index 000000000..94033e829 --- /dev/null +++ b/deluge/plugins/Toggle/deluge/__init__.py @@ -0,0 +1,3 @@ +# this is a namespace package +import pkg_resources +pkg_resources.declare_namespace(__name__) diff --git a/deluge/plugins/Toggle/deluge/plugins/__init__.py b/deluge/plugins/Toggle/deluge/plugins/__init__.py new file mode 100644 index 000000000..94033e829 --- /dev/null +++ b/deluge/plugins/Toggle/deluge/plugins/__init__.py @@ -0,0 +1,3 @@ +# this is a namespace package +import pkg_resources +pkg_resources.declare_namespace(__name__) diff --git a/deluge/plugins/toggle/toggle/__init__.py b/deluge/plugins/Toggle/deluge/plugins/toggle/__init__.py similarity index 100% rename from deluge/plugins/toggle/toggle/__init__.py rename to deluge/plugins/Toggle/deluge/plugins/toggle/__init__.py diff --git a/deluge/plugins/toggle/toggle/common.py b/deluge/plugins/Toggle/deluge/plugins/toggle/common.py similarity index 92% rename from deluge/plugins/toggle/toggle/common.py rename to deluge/plugins/Toggle/deluge/plugins/toggle/common.py index 616249a28..de9ce4973 100644 --- a/deluge/plugins/toggle/toggle/common.py +++ b/deluge/plugins/Toggle/deluge/plugins/toggle/common.py @@ -39,4 +39,5 @@ def get_resource(filename): import pkg_resources, os - return pkg_resources.resource_filename("toggle", os.path.join("data", filename)) + return pkg_resources.resource_filename("deluge.plugins.toggle", + os.path.join("data", filename)) diff --git a/deluge/plugins/toggle/toggle/core.py b/deluge/plugins/Toggle/deluge/plugins/toggle/core.py similarity index 100% rename from deluge/plugins/toggle/toggle/core.py rename to deluge/plugins/Toggle/deluge/plugins/toggle/core.py diff --git a/deluge/plugins/toggle/toggle/data/toggle.js b/deluge/plugins/Toggle/deluge/plugins/toggle/data/toggle.js similarity index 100% rename from deluge/plugins/toggle/toggle/data/toggle.js rename to deluge/plugins/Toggle/deluge/plugins/toggle/data/toggle.js diff --git a/deluge/plugins/toggle/toggle/gtkui.py b/deluge/plugins/Toggle/deluge/plugins/toggle/gtkui.py similarity index 100% rename from deluge/plugins/toggle/toggle/gtkui.py rename to deluge/plugins/Toggle/deluge/plugins/toggle/gtkui.py diff --git a/deluge/plugins/toggle/toggle/webui.py b/deluge/plugins/Toggle/deluge/plugins/toggle/webui.py similarity index 100% rename from deluge/plugins/toggle/toggle/webui.py rename to deluge/plugins/Toggle/deluge/plugins/toggle/webui.py diff --git a/deluge/plugins/toggle/setup.py b/deluge/plugins/Toggle/setup.py similarity index 87% rename from deluge/plugins/toggle/setup.py rename to deluge/plugins/Toggle/setup.py index 3da5edd08..c772d22e1 100644 --- a/deluge/plugins/toggle/setup.py +++ b/deluge/plugins/Toggle/setup.py @@ -37,7 +37,7 @@ # statement from all source files in the program, then also delete it here. # -from setuptools import setup +from setuptools import setup, find_packages __plugin_name__ = "Toggle" __author__ = "John Garland" @@ -47,7 +47,7 @@ __url__ = "http://deluge-torrent.org" __license__ = "GPLv3" __description__ = "Toggles the session" __long_description__ = """""" -__pkg_data__ = {__plugin_name__.lower(): ["template/*", "data/*"]} +__pkg_data__ = {"deluge.plugins."+__plugin_name__.lower(): ["template/*", "data/*"]} setup( name=__plugin_name__, @@ -59,15 +59,16 @@ setup( license=__license__, long_description=__long_description__ if __long_description__ else __description__, - packages=[__plugin_name__.lower()], + packages=find_packages(), + namespace_packages = ["deluge", "deluge.plugins"], package_data = __pkg_data__, entry_points=""" [deluge.plugin.core] - %s = %s:CorePlugin + %s = deluge.plugins.%s:CorePlugin [deluge.plugin.gtkui] - %s = %s:GtkUIPlugin + %s = deluge.plugins.%s:GtkUIPlugin [deluge.plugin.webui] - %s = %s:WebUIPlugin + %s = deluge.plugins.%s:WebUIPlugin """ % ((__plugin_name__, __plugin_name__.lower())*3) ) diff --git a/deluge/plugins/webui/create_dev_link.sh b/deluge/plugins/WebUi/create_dev_link.sh similarity index 100% rename from deluge/plugins/webui/create_dev_link.sh rename to deluge/plugins/WebUi/create_dev_link.sh diff --git a/deluge/plugins/WebUi/deluge/__init__.py b/deluge/plugins/WebUi/deluge/__init__.py new file mode 100644 index 000000000..94033e829 --- /dev/null +++ b/deluge/plugins/WebUi/deluge/__init__.py @@ -0,0 +1,3 @@ +# this is a namespace package +import pkg_resources +pkg_resources.declare_namespace(__name__) diff --git a/deluge/plugins/WebUi/deluge/plugins/__init__.py b/deluge/plugins/WebUi/deluge/plugins/__init__.py new file mode 100644 index 000000000..94033e829 --- /dev/null +++ b/deluge/plugins/WebUi/deluge/plugins/__init__.py @@ -0,0 +1,3 @@ +# this is a namespace package +import pkg_resources +pkg_resources.declare_namespace(__name__) diff --git a/deluge/plugins/webui/webui/__init__.py b/deluge/plugins/WebUi/deluge/plugins/webui/__init__.py similarity index 100% rename from deluge/plugins/webui/webui/__init__.py rename to deluge/plugins/WebUi/deluge/plugins/webui/__init__.py diff --git a/deluge/plugins/webui/webui/common.py b/deluge/plugins/WebUi/deluge/plugins/webui/common.py similarity index 91% rename from deluge/plugins/webui/webui/common.py rename to deluge/plugins/WebUi/deluge/plugins/webui/common.py index a85371ec6..5f95709fe 100644 --- a/deluge/plugins/webui/webui/common.py +++ b/deluge/plugins/WebUi/deluge/plugins/webui/common.py @@ -38,4 +38,5 @@ def get_resource(filename): import pkg_resources, os - return pkg_resources.resource_filename("webui", os.path.join("data", filename)) + return pkg_resources.resource_filename("deluge.plugins.webui", + os.path.join("data", filename)) diff --git a/deluge/plugins/webui/webui/core.py b/deluge/plugins/WebUi/deluge/plugins/webui/core.py similarity index 100% rename from deluge/plugins/webui/webui/core.py rename to deluge/plugins/WebUi/deluge/plugins/webui/core.py diff --git a/deluge/plugins/webui/webui/data/config.glade b/deluge/plugins/WebUi/deluge/plugins/webui/data/config.glade similarity index 100% rename from deluge/plugins/webui/webui/data/config.glade rename to deluge/plugins/WebUi/deluge/plugins/webui/data/config.glade diff --git a/deluge/plugins/webui/webui/gtkui.py b/deluge/plugins/WebUi/deluge/plugins/webui/gtkui.py similarity index 100% rename from deluge/plugins/webui/webui/gtkui.py rename to deluge/plugins/WebUi/deluge/plugins/webui/gtkui.py diff --git a/deluge/plugins/webui/setup.py b/deluge/plugins/WebUi/setup.py similarity index 88% rename from deluge/plugins/webui/setup.py rename to deluge/plugins/WebUi/setup.py index 25cf05dc2..768263e97 100644 --- a/deluge/plugins/webui/setup.py +++ b/deluge/plugins/WebUi/setup.py @@ -36,7 +36,7 @@ # statement from all source files in the program, then also delete it here. # -from setuptools import setup +from setuptools import setup, find_packages __plugin_name__ = "WebUi" __author__ = "Damien Churchill" @@ -46,7 +46,7 @@ __url__ = "http://deluge-torrent.org" __license__ = "GPLv3" __description__ = "Allows starting the web interface within the daemon." __long_description__ = """""" -__pkg_data__ = {__plugin_name__.lower(): ["template/*", "data/*"]} +__pkg_data__ = {"deluge.plugins."+__plugin_name__.lower(): ["template/*", "data/*"]} setup( name=__plugin_name__, @@ -58,13 +58,14 @@ setup( license=__license__, long_description=__long_description__ if __long_description__ else __description__, - packages=[__plugin_name__.lower()], + packages=find_packages(), + namespace_packages = ["deluge", "deluge.plugins"], package_data = __pkg_data__, entry_points=""" [deluge.plugin.core] - %s = %s:CorePlugin + %s = deluge.plugins.%s:CorePlugin [deluge.plugin.gtkui] - %s = %s:GtkUIPlugin + %s = deluge.plugins.%s:GtkUIPlugin """ % ((__plugin_name__, __plugin_name__.lower())*2) ) diff --git a/deluge/scripts/create_plugin.py b/deluge/scripts/create_plugin.py index 7c6006f93..c35a5c711 100644 --- a/deluge/scripts/create_plugin.py +++ b/deluge/scripts/create_plugin.py @@ -360,6 +360,7 @@ GPL = """# # Copyright (C) 2008 Martijn Voncken # Copyright (C) 2007-2009 Andrew Resch # Copyright (C) 2009 Damien Churchill +# Copyright (C) 2010 Pedro Algarvio # # Deluge is free software. #