diff options
author | Andrew Resch <andrewresch@gmail.com> | 2011-06-03 14:55:34 -0700 |
---|---|---|
committer | Andrew Resch <andrewresch@gmail.com> | 2011-06-03 14:55:34 -0700 |
commit | 84c5078667d90186e675c17dfdc3d949a55e4745 (patch) | |
tree | 6c7a7203f3e9a9095723fe3dd4b7c012b9cc08e3 /deluge | |
parent | cebdc89b1896bb0c960f5862b01d2c7204aba812 (diff) | |
parent | 87e767d4c1d03f88cef6cd3f9d7c71ed2ac06e29 (diff) | |
download | deluge-84c5078667d90186e675c17dfdc3d949a55e4745.tar.gz deluge-84c5078667d90186e675c17dfdc3d949a55e4745.tar.bz2 deluge-84c5078667d90186e675c17dfdc3d949a55e4745.zip |
Merge branch 'master' of deluge-torrent.org:deluge
Diffstat (limited to 'deluge')
-rw-r--r-- | deluge/__init__.py | 3 | ||||
-rw-r--r-- | deluge/pluginmanagerbase.py | 17 | ||||
-rw-r--r-- | deluge/plugins/AutoAdd/deluge/__init__.py | 3 | ||||
-rw-r--r-- | deluge/plugins/AutoAdd/deluge/plugins/__init__.py | 3 | ||||
-rw-r--r-- | deluge/plugins/AutoAdd/deluge/plugins/autoadd/__init__.py (renamed from deluge/plugins/autoadd/autoadd/__init__.py) | 0 | ||||
-rw-r--r-- | deluge/plugins/AutoAdd/deluge/plugins/autoadd/common.py (renamed from deluge/plugins/autoadd/autoadd/common.py) | 3 | ||||
-rw-r--r-- | deluge/plugins/AutoAdd/deluge/plugins/autoadd/core.py (renamed from deluge/plugins/autoadd/autoadd/core.py) | 0 | ||||
-rw-r--r-- | deluge/plugins/AutoAdd/deluge/plugins/autoadd/data/autoadd.js (renamed from deluge/plugins/autoadd/autoadd/data/autoadd.js) | 0 | ||||
-rw-r--r-- | deluge/plugins/AutoAdd/deluge/plugins/autoadd/data/autoadd_options.glade (renamed from deluge/plugins/autoadd/autoadd/data/autoadd_options.glade) | 0 | ||||
-rw-r--r-- | deluge/plugins/AutoAdd/deluge/plugins/autoadd/data/config.glade (renamed from deluge/plugins/autoadd/autoadd/data/config.glade) | 0 | ||||
-rw-r--r-- | deluge/plugins/AutoAdd/deluge/plugins/autoadd/gtkui.py (renamed from deluge/plugins/autoadd/autoadd/gtkui.py) | 0 | ||||
-rw-r--r-- | deluge/plugins/AutoAdd/deluge/plugins/autoadd/webui.py (renamed from deluge/plugins/autoadd/autoadd/webui.py) | 0 | ||||
-rw-r--r-- | deluge/plugins/AutoAdd/setup.py (renamed from deluge/plugins/autoadd/setup.py) | 14 | ||||
-rw-r--r-- | deluge/plugins/Blocklist/deluge/__init__.py | 3 | ||||
-rw-r--r-- | deluge/plugins/Blocklist/deluge/plugins/__init__.py | 3 | ||||
-rw-r--r-- | deluge/plugins/Blocklist/deluge/plugins/blocklist/__init__.py (renamed from deluge/plugins/blocklist/blocklist/__init__.py) | 0 | ||||
-rw-r--r-- | deluge/plugins/Blocklist/deluge/plugins/blocklist/common.py (renamed from deluge/plugins/blocklist/blocklist/common.py) | 11 | ||||
-rw-r--r-- | deluge/plugins/Blocklist/deluge/plugins/blocklist/core.py (renamed from deluge/plugins/blocklist/blocklist/core.py) | 0 | ||||
-rw-r--r-- | deluge/plugins/Blocklist/deluge/plugins/blocklist/data/COPYING (renamed from deluge/plugins/blocklist/blocklist/data/COPYING) | 0 | ||||
-rw-r--r-- | deluge/plugins/Blocklist/deluge/plugins/blocklist/data/LICENSE (renamed from deluge/plugins/blocklist/blocklist/data/LICENSE) | 0 | ||||
-rw-r--r-- | deluge/plugins/Blocklist/deluge/plugins/blocklist/data/blocklist16.png (renamed from deluge/plugins/blocklist/blocklist/data/blocklist16.png) | bin | 705 -> 705 bytes | |||
-rw-r--r-- | deluge/plugins/Blocklist/deluge/plugins/blocklist/data/blocklist_download24.png (renamed from deluge/plugins/blocklist/blocklist/data/blocklist_download24.png) | bin | 926 -> 926 bytes | |||
-rw-r--r-- | deluge/plugins/Blocklist/deluge/plugins/blocklist/data/blocklist_import24.png (renamed from deluge/plugins/blocklist/blocklist/data/blocklist_import24.png) | bin | 1240 -> 1240 bytes | |||
-rw-r--r-- | deluge/plugins/Blocklist/deluge/plugins/blocklist/data/blocklist_pref.glade (renamed from deluge/plugins/blocklist/blocklist/data/blocklist_pref.glade) | 0 | ||||
-rw-r--r-- | deluge/plugins/Blocklist/deluge/plugins/blocklist/decompressers.py (renamed from deluge/plugins/blocklist/blocklist/decompressers.py) | 0 | ||||
-rw-r--r-- | deluge/plugins/Blocklist/deluge/plugins/blocklist/detect.py (renamed from deluge/plugins/blocklist/blocklist/detect.py) | 0 | ||||
-rw-r--r-- | deluge/plugins/Blocklist/deluge/plugins/blocklist/gtkui.py (renamed from deluge/plugins/blocklist/blocklist/gtkui.py) | 0 | ||||
-rw-r--r-- | deluge/plugins/Blocklist/deluge/plugins/blocklist/peerguardian.py (renamed from deluge/plugins/blocklist/blocklist/peerguardian.py) | 0 | ||||
-rw-r--r-- | deluge/plugins/Blocklist/deluge/plugins/blocklist/readers.py (renamed from deluge/plugins/blocklist/blocklist/readers.py) | 0 | ||||
-rw-r--r-- | deluge/plugins/Blocklist/deluge/plugins/blocklist/webui.py (renamed from deluge/plugins/blocklist/blocklist/webui.py) | 0 | ||||
-rw-r--r-- | deluge/plugins/Blocklist/setup.py (renamed from deluge/plugins/blocklist/setup.py) | 13 | ||||
-rw-r--r-- | deluge/plugins/Example/deluge/__init__.py | 3 | ||||
-rw-r--r-- | deluge/plugins/Example/deluge/plugins/__init__.py | 3 | ||||
-rw-r--r-- | deluge/plugins/Example/deluge/plugins/example/__init__.py (renamed from deluge/plugins/example/example/__init__.py) | 0 | ||||
-rw-r--r-- | deluge/plugins/Example/deluge/plugins/example/common.py (renamed from deluge/plugins/execute/execute/common.py) | 3 | ||||
-rw-r--r-- | deluge/plugins/Example/deluge/plugins/example/core.py (renamed from deluge/plugins/example/example/core.py) | 0 | ||||
-rw-r--r-- | deluge/plugins/Example/deluge/plugins/example/data/example.js (renamed from deluge/plugins/example/example/data/example.js) | 0 | ||||
-rw-r--r-- | deluge/plugins/Example/deluge/plugins/example/gtkui.py (renamed from deluge/plugins/example/example/gtkui.py) | 0 | ||||
-rw-r--r-- | deluge/plugins/Example/deluge/plugins/example/webui.py (renamed from deluge/plugins/example/example/webui.py) | 0 | ||||
-rw-r--r-- | deluge/plugins/Example/setup.py (renamed from deluge/plugins/example/setup.py) | 13 | ||||
-rw-r--r-- | deluge/plugins/Execute/deluge/__init__.py | 3 | ||||
-rw-r--r-- | deluge/plugins/Execute/deluge/plugins/__init__.py | 3 | ||||
-rw-r--r-- | deluge/plugins/Execute/deluge/plugins/execute/__init__.py (renamed from deluge/plugins/execute/execute/__init__.py) | 0 | ||||
-rw-r--r-- | deluge/plugins/Execute/deluge/plugins/execute/common.py (renamed from deluge/plugins/example/example/common.py) | 3 | ||||
-rw-r--r-- | deluge/plugins/Execute/deluge/plugins/execute/core.py (renamed from deluge/plugins/execute/execute/core.py) | 0 | ||||
-rw-r--r-- | deluge/plugins/Execute/deluge/plugins/execute/data/execute.js (renamed from deluge/plugins/execute/execute/data/execute.js) | 0 | ||||
-rw-r--r-- | deluge/plugins/Execute/deluge/plugins/execute/data/execute_prefs.glade (renamed from deluge/plugins/execute/execute/data/execute_prefs.glade) | 0 | ||||
-rw-r--r-- | deluge/plugins/Execute/deluge/plugins/execute/gtkui.py (renamed from deluge/plugins/execute/execute/gtkui.py) | 0 | ||||
-rw-r--r-- | deluge/plugins/Execute/deluge/plugins/execute/webui.py (renamed from deluge/plugins/execute/execute/webui.py) | 1 | ||||
-rw-r--r-- | deluge/plugins/Execute/setup.py (renamed from deluge/plugins/execute/setup.py) | 13 | ||||
-rw-r--r-- | deluge/plugins/Extractor/deluge/__init__.py | 3 | ||||
-rw-r--r-- | deluge/plugins/Extractor/deluge/plugins/__init__.py | 3 | ||||
-rw-r--r-- | deluge/plugins/Extractor/deluge/plugins/extractor/__init__.py (renamed from deluge/plugins/extractor/extractor/__init__.py) | 0 | ||||
-rw-r--r-- | deluge/plugins/Extractor/deluge/plugins/extractor/common.py (renamed from deluge/plugins/extractor/extractor/common.py) | 3 | ||||
-rw-r--r-- | deluge/plugins/Extractor/deluge/plugins/extractor/core.py (renamed from deluge/plugins/extractor/extractor/core.py) | 0 | ||||
-rw-r--r-- | deluge/plugins/Extractor/deluge/plugins/extractor/data/extractor_prefs.glade (renamed from deluge/plugins/extractor/extractor/data/extractor_prefs.glade) | 0 | ||||
-rw-r--r-- | deluge/plugins/Extractor/deluge/plugins/extractor/gtkui.py (renamed from deluge/plugins/extractor/extractor/gtkui.py) | 0 | ||||
-rw-r--r-- | deluge/plugins/Extractor/deluge/plugins/extractor/webui.py (renamed from deluge/plugins/extractor/extractor/webui.py) | 0 | ||||
-rw-r--r-- | deluge/plugins/Extractor/setup.py (renamed from deluge/plugins/extractor/setup.py) | 13 | ||||
-rw-r--r-- | deluge/plugins/Feeder/deluge/__init__.py | 3 | ||||
-rw-r--r-- | deluge/plugins/Feeder/deluge/plugins/__init__.py | 3 | ||||
-rw-r--r-- | deluge/plugins/Feeder/deluge/plugins/feeder/__init__.py (renamed from deluge/plugins/feeder/feeder/__init__.py) | 0 | ||||
-rw-r--r-- | deluge/plugins/Feeder/deluge/plugins/feeder/core.py (renamed from deluge/plugins/feeder/feeder/core.py) | 0 | ||||
-rw-r--r-- | deluge/plugins/Feeder/deluge/plugins/feeder/template/feeds.html (renamed from deluge/plugins/feeder/feeder/template/feeds.html) | 0 | ||||
-rw-r--r-- | deluge/plugins/Feeder/deluge/plugins/feeder/template/filter_settings.html (renamed from deluge/plugins/feeder/feeder/template/filter_settings.html) | 0 | ||||
-rw-r--r-- | deluge/plugins/Feeder/deluge/plugins/feeder/template/filters.html (renamed from deluge/plugins/feeder/feeder/template/filters.html) | 0 | ||||
-rw-r--r-- | deluge/plugins/Feeder/deluge/plugins/feeder/webui.py (renamed from deluge/plugins/feeder/feeder/webui.py) | 0 | ||||
-rw-r--r-- | deluge/plugins/Feeder/setup.py (renamed from deluge/plugins/feeder/setup.py) | 13 | ||||
-rwxr-xr-x | deluge/plugins/FreeSpace/create_dev_link.sh | 11 | ||||
-rw-r--r-- | deluge/plugins/FreeSpace/deluge/__init__.py | 3 | ||||
-rw-r--r-- | deluge/plugins/FreeSpace/deluge/plugins/__init__.py | 3 | ||||
-rw-r--r-- | deluge/plugins/FreeSpace/deluge/plugins/freespace/__init__.py (renamed from deluge/plugins/freespace/freespace/__init__.py) | 0 | ||||
-rw-r--r-- | deluge/plugins/FreeSpace/deluge/plugins/freespace/common.py (renamed from deluge/plugins/freespace/freespace/common.py) | 3 | ||||
-rw-r--r-- | deluge/plugins/FreeSpace/deluge/plugins/freespace/core.py (renamed from deluge/plugins/freespace/freespace/core.py) | 0 | ||||
-rw-r--r-- | deluge/plugins/FreeSpace/deluge/plugins/freespace/data/config.glade (renamed from deluge/plugins/freespace/freespace/data/config.glade) | 0 | ||||
-rw-r--r-- | deluge/plugins/FreeSpace/deluge/plugins/freespace/data/freespace.js (renamed from deluge/plugins/freespace/freespace/data/freespace.js) | 0 | ||||
-rw-r--r-- | deluge/plugins/FreeSpace/deluge/plugins/freespace/gtkui.py (renamed from deluge/plugins/freespace/freespace/gtkui.py) | 0 | ||||
-rw-r--r-- | deluge/plugins/FreeSpace/deluge/plugins/freespace/webui.py (renamed from deluge/plugins/freespace/freespace/webui.py) | 0 | ||||
-rwxr-xr-x | deluge/plugins/FreeSpace/setup.py (renamed from deluge/plugins/freespace/setup.py) | 11 | ||||
-rw-r--r-- | deluge/plugins/Label/TODO (renamed from deluge/plugins/label/TODO) | 0 | ||||
-rw-r--r-- | deluge/plugins/Label/deluge/__init__.py | 3 | ||||
-rw-r--r-- | deluge/plugins/Label/deluge/plugins/__init__.py | 3 | ||||
-rw-r--r-- | deluge/plugins/Label/deluge/plugins/label/__init__.py (renamed from deluge/plugins/label/label/__init__.py) | 0 | ||||
-rw-r--r-- | deluge/plugins/Label/deluge/plugins/label/core.py (renamed from deluge/plugins/label/label/core.py) | 0 | ||||
-rw-r--r-- | deluge/plugins/Label/deluge/plugins/label/data/label.js (renamed from deluge/plugins/label/label/data/label.js) | 0 | ||||
-rw-r--r-- | deluge/plugins/Label/deluge/plugins/label/data/label_options.glade (renamed from deluge/plugins/label/label/data/label_options.glade) | 0 | ||||
-rw-r--r-- | deluge/plugins/Label/deluge/plugins/label/data/label_pref.glade (renamed from deluge/plugins/label/label/data/label_pref.glade) | 0 | ||||
-rw-r--r-- | deluge/plugins/Label/deluge/plugins/label/gtkui/__init__.py (renamed from deluge/plugins/label/label/gtkui/__init__.py) | 0 | ||||
-rw-r--r-- | deluge/plugins/Label/deluge/plugins/label/gtkui/label_config.py (renamed from deluge/plugins/label/label/gtkui/label_config.py) | 0 | ||||
-rw-r--r-- | deluge/plugins/Label/deluge/plugins/label/gtkui/sidebar_menu.py (renamed from deluge/plugins/label/label/gtkui/sidebar_menu.py) | 0 | ||||
-rw-r--r-- | deluge/plugins/Label/deluge/plugins/label/gtkui/submenu.py (renamed from deluge/plugins/label/label/gtkui/submenu.py) | 0 | ||||
-rw-r--r-- | deluge/plugins/Label/deluge/plugins/label/test.py (renamed from deluge/plugins/label/label/test.py) | 0 | ||||
-rw-r--r-- | deluge/plugins/Label/deluge/plugins/label/webui.py (renamed from deluge/plugins/label/label/webui.py) | 3 | ||||
-rw-r--r-- | deluge/plugins/Label/setup.py (renamed from deluge/plugins/label/setup.py) | 13 | ||||
-rwxr-xr-x | deluge/plugins/Notifications/create_dev_link.sh | 11 | ||||
-rw-r--r-- | deluge/plugins/Notifications/deluge/__init__.py | 3 | ||||
-rw-r--r-- | deluge/plugins/Notifications/deluge/plugins/__init__.py | 3 | ||||
-rw-r--r-- | deluge/plugins/Notifications/deluge/plugins/notifications/__init__.py (renamed from deluge/plugins/notifications/notifications/__init__.py) | 0 | ||||
-rw-r--r-- | deluge/plugins/Notifications/deluge/plugins/notifications/common.py (renamed from deluge/plugins/notifications/notifications/common.py) | 2 | ||||
-rw-r--r-- | deluge/plugins/Notifications/deluge/plugins/notifications/core.py (renamed from deluge/plugins/notifications/notifications/core.py) | 2 | ||||
-rw-r--r-- | deluge/plugins/Notifications/deluge/plugins/notifications/data/config.glade (renamed from deluge/plugins/notifications/notifications/data/config.glade) | 0 | ||||
-rw-r--r-- | deluge/plugins/Notifications/deluge/plugins/notifications/data/notifications.js (renamed from deluge/plugins/notifications/notifications/data/notifications.js) | 0 | ||||
-rw-r--r-- | deluge/plugins/Notifications/deluge/plugins/notifications/gtkui.py (renamed from deluge/plugins/notifications/notifications/gtkui.py) | 0 | ||||
-rw-r--r-- | deluge/plugins/Notifications/deluge/plugins/notifications/test.py (renamed from deluge/plugins/notifications/notifications/test.py) | 0 | ||||
-rw-r--r-- | deluge/plugins/Notifications/deluge/plugins/notifications/webui.py (renamed from deluge/plugins/notifications/notifications/webui.py) | 0 | ||||
-rwxr-xr-x | deluge/plugins/Notifications/setup.py (renamed from deluge/plugins/notifications/setup.py) | 7 | ||||
-rw-r--r-- | deluge/plugins/Scheduler/deluge/__init__.py | 3 | ||||
-rw-r--r-- | deluge/plugins/Scheduler/deluge/plugins/__init__.py | 3 | ||||
-rw-r--r-- | deluge/plugins/Scheduler/deluge/plugins/scheduler/__init__.py (renamed from deluge/plugins/scheduler/scheduler/__init__.py) | 0 | ||||
-rw-r--r-- | deluge/plugins/Scheduler/deluge/plugins/scheduler/common.py (renamed from deluge/plugins/scheduler/scheduler/common.py) | 3 | ||||
-rw-r--r-- | deluge/plugins/Scheduler/deluge/plugins/scheduler/core.py (renamed from deluge/plugins/scheduler/scheduler/core.py) | 0 | ||||
-rw-r--r-- | deluge/plugins/Scheduler/deluge/plugins/scheduler/data/green.png (renamed from deluge/plugins/scheduler/scheduler/data/green.png) | bin | 792 -> 792 bytes | |||
-rw-r--r-- | deluge/plugins/Scheduler/deluge/plugins/scheduler/data/red.png (renamed from deluge/plugins/scheduler/scheduler/data/red.png) | bin | 759 -> 759 bytes | |||
-rw-r--r-- | deluge/plugins/Scheduler/deluge/plugins/scheduler/data/scheduler.js (renamed from deluge/plugins/scheduler/scheduler/data/scheduler.js) | 0 | ||||
-rw-r--r-- | deluge/plugins/Scheduler/deluge/plugins/scheduler/data/yellow.png (renamed from deluge/plugins/scheduler/scheduler/data/yellow.png) | bin | 770 -> 770 bytes | |||
-rw-r--r-- | deluge/plugins/Scheduler/deluge/plugins/scheduler/gtkui.py (renamed from deluge/plugins/scheduler/scheduler/gtkui.py) | 0 | ||||
-rw-r--r-- | deluge/plugins/Scheduler/deluge/plugins/scheduler/webui.py (renamed from deluge/plugins/scheduler/scheduler/webui.py) | 0 | ||||
-rw-r--r-- | deluge/plugins/Scheduler/setup.py (renamed from deluge/plugins/scheduler/setup.py) | 13 | ||||
-rwxr-xr-x | deluge/plugins/Stats/create_dev_link.sh | 11 | ||||
-rw-r--r-- | deluge/plugins/Stats/deluge/__init__.py | 3 | ||||
-rw-r--r-- | deluge/plugins/Stats/deluge/plugins/__init__.py | 3 | ||||
-rw-r--r-- | deluge/plugins/Stats/deluge/plugins/stats/__init__.py (renamed from deluge/plugins/stats/stats/__init__.py) | 0 | ||||
-rw-r--r-- | deluge/plugins/Stats/deluge/plugins/stats/common.py (renamed from deluge/plugins/stats/stats/common.py) | 3 | ||||
-rw-r--r-- | deluge/plugins/Stats/deluge/plugins/stats/core.py (renamed from deluge/plugins/stats/stats/core.py) | 0 | ||||
-rw-r--r-- | deluge/plugins/Stats/deluge/plugins/stats/data/config.glade (renamed from deluge/plugins/stats/stats/data/config.glade) | 0 | ||||
-rw-r--r-- | deluge/plugins/Stats/deluge/plugins/stats/data/stats.js (renamed from deluge/plugins/stats/stats/data/stats.js) | 0 | ||||
-rw-r--r-- | deluge/plugins/Stats/deluge/plugins/stats/data/tabs.glade (renamed from deluge/plugins/stats/stats/data/tabs.glade) | 0 | ||||
-rw-r--r-- | deluge/plugins/Stats/deluge/plugins/stats/graph.py (renamed from deluge/plugins/stats/stats/graph.py) | 0 | ||||
-rw-r--r-- | deluge/plugins/Stats/deluge/plugins/stats/gtkui.py (renamed from deluge/plugins/stats/stats/gtkui.py) | 0 | ||||
-rw-r--r-- | deluge/plugins/Stats/deluge/plugins/stats/test.html (renamed from deluge/plugins/stats/stats/test.html) | 0 | ||||
-rw-r--r-- | deluge/plugins/Stats/deluge/plugins/stats/test.py (renamed from deluge/plugins/stats/stats/test.py) | 0 | ||||
-rw-r--r-- | deluge/plugins/Stats/deluge/plugins/stats/test.sh (renamed from deluge/plugins/stats/stats/test.sh) | 0 | ||||
-rw-r--r-- | deluge/plugins/Stats/deluge/plugins/stats/test_total.py (renamed from deluge/plugins/stats/stats/test_total.py) | 0 | ||||
-rw-r--r-- | deluge/plugins/Stats/deluge/plugins/stats/webui.py (renamed from deluge/plugins/stats/stats/webui.py) | 0 | ||||
-rw-r--r-- | deluge/plugins/Stats/setup.py (renamed from deluge/plugins/stats/setup.py) | 13 | ||||
-rw-r--r-- | deluge/plugins/Toggle/deluge/__init__.py | 3 | ||||
-rw-r--r-- | deluge/plugins/Toggle/deluge/plugins/__init__.py | 3 | ||||
-rw-r--r-- | deluge/plugins/Toggle/deluge/plugins/toggle/__init__.py (renamed from deluge/plugins/toggle/toggle/__init__.py) | 0 | ||||
-rw-r--r-- | deluge/plugins/Toggle/deluge/plugins/toggle/common.py (renamed from deluge/plugins/toggle/toggle/common.py) | 3 | ||||
-rw-r--r-- | deluge/plugins/Toggle/deluge/plugins/toggle/core.py (renamed from deluge/plugins/toggle/toggle/core.py) | 0 | ||||
-rw-r--r-- | deluge/plugins/Toggle/deluge/plugins/toggle/data/toggle.js (renamed from deluge/plugins/toggle/toggle/data/toggle.js) | 0 | ||||
-rw-r--r-- | deluge/plugins/Toggle/deluge/plugins/toggle/gtkui.py (renamed from deluge/plugins/toggle/toggle/gtkui.py) | 0 | ||||
-rw-r--r-- | deluge/plugins/Toggle/deluge/plugins/toggle/webui.py (renamed from deluge/plugins/toggle/toggle/webui.py) | 0 | ||||
-rw-r--r-- | deluge/plugins/Toggle/setup.py (renamed from deluge/plugins/toggle/setup.py) | 13 | ||||
-rwxr-xr-x | deluge/plugins/WebUi/create_dev_link.sh | 11 | ||||
-rw-r--r-- | deluge/plugins/WebUi/deluge/__init__.py | 3 | ||||
-rw-r--r-- | deluge/plugins/WebUi/deluge/plugins/__init__.py | 3 | ||||
-rw-r--r-- | deluge/plugins/WebUi/deluge/plugins/webui/__init__.py (renamed from deluge/plugins/webui/webui/__init__.py) | 0 | ||||
-rw-r--r-- | deluge/plugins/WebUi/deluge/plugins/webui/common.py (renamed from deluge/plugins/webui/webui/common.py) | 3 | ||||
-rw-r--r-- | deluge/plugins/WebUi/deluge/plugins/webui/core.py (renamed from deluge/plugins/webui/webui/core.py) | 0 | ||||
-rw-r--r-- | deluge/plugins/WebUi/deluge/plugins/webui/data/config.glade (renamed from deluge/plugins/webui/webui/data/config.glade) | 0 | ||||
-rw-r--r-- | deluge/plugins/WebUi/deluge/plugins/webui/gtkui.py (renamed from deluge/plugins/webui/webui/gtkui.py) | 0 | ||||
-rw-r--r-- | deluge/plugins/WebUi/setup.py (renamed from deluge/plugins/webui/setup.py) | 11 | ||||
-rw-r--r-- | deluge/plugins/__init__.py | 3 | ||||
-rwxr-xr-x | deluge/plugins/freespace/create_dev_link.sh | 7 | ||||
-rwxr-xr-x | deluge/plugins/notifications/create_dev_link.sh | 7 | ||||
-rwxr-xr-x | deluge/plugins/stats/create_dev_link.sh | 6 | ||||
-rwxr-xr-x | deluge/plugins/webui/create_dev_link.sh | 7 | ||||
-rw-r--r-- | deluge/scripts/create_plugin.py | 80 |
159 files changed, 311 insertions, 147 deletions
diff --git a/deluge/__init__.py b/deluge/__init__.py index 1836ded86..fe92cd136 100644 --- a/deluge/__init__.py +++ b/deluge/__init__.py @@ -1 +1,4 @@ """Deluge""" +# this is a namespace package +import pkg_resources +pkg_resources.declare_namespace(__name__) diff --git a/deluge/pluginmanagerbase.py b/deluge/pluginmanagerbase.py index 2b4bb88b8..d9a01af98 100644 --- a/deluge/pluginmanagerbase.py +++ b/deluge/pluginmanagerbase.py @@ -59,6 +59,16 @@ METADATA_KEYS = [ "Description", ] +DEPRECATION_WARNING = """ +The plugin %s is not using the "deluge.plugins" namespace. +In order to avoid package name clashes between regular python packages and +deluge plugins, the way deluge plugins should be created has changed. +If you're seeing this message and you're not the developer of the plugin which +triggered this warning, please report to it's author. +If you're the developer, please take a look at the plugins hosted on deluge's +git repository to have an idea of what needs to be changed. +""" + class PluginManagerBase: """PluginManagerBase is a base class for PluginManagers to inherit""" @@ -140,6 +150,13 @@ class PluginManagerBase: log.exception(e) continue instance.enable() + if not instance.__module__.startswith("deluge.plugins"): + import warnings + warnings.warn_explicit( + DEPRECATION_WARNING % name, + DeprecationWarning, + instance.__module__, 0 + ) if self._component_state == "Started": component.start([instance.plugin._component_name]) plugin_name = plugin_name.replace("-", " ") diff --git a/deluge/plugins/AutoAdd/deluge/__init__.py b/deluge/plugins/AutoAdd/deluge/__init__.py new file mode 100644 index 000000000..94033e829 --- /dev/null +++ b/deluge/plugins/AutoAdd/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/AutoAdd/deluge/plugins/__init__.py b/deluge/plugins/AutoAdd/deluge/plugins/__init__.py new file mode 100644 index 000000000..94033e829 --- /dev/null +++ b/deluge/plugins/AutoAdd/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/autoadd/autoadd/__init__.py b/deluge/plugins/AutoAdd/deluge/plugins/autoadd/__init__.py index 813e7e3c8..813e7e3c8 100644 --- a/deluge/plugins/autoadd/autoadd/__init__.py +++ b/deluge/plugins/AutoAdd/deluge/plugins/autoadd/__init__.py diff --git a/deluge/plugins/autoadd/autoadd/common.py b/deluge/plugins/AutoAdd/deluge/plugins/autoadd/common.py index 16172a975..cc1b6a01e 100644 --- a/deluge/plugins/autoadd/autoadd/common.py +++ b/deluge/plugins/AutoAdd/deluge/plugins/autoadd/common.py @@ -39,4 +39,5 @@ def get_resource(filename): import pkg_resources, os - return pkg_resources.resource_filename("autoadd", os.path.join("data", filename)) + return pkg_resources.resource_filename("deluge.plugins.autoadd", + os.path.join("data", filename)) diff --git a/deluge/plugins/autoadd/autoadd/core.py b/deluge/plugins/AutoAdd/deluge/plugins/autoadd/core.py index e0b3f5b53..e0b3f5b53 100644 --- a/deluge/plugins/autoadd/autoadd/core.py +++ b/deluge/plugins/AutoAdd/deluge/plugins/autoadd/core.py diff --git a/deluge/plugins/autoadd/autoadd/data/autoadd.js b/deluge/plugins/AutoAdd/deluge/plugins/autoadd/data/autoadd.js index f8f004f01..f8f004f01 100644 --- a/deluge/plugins/autoadd/autoadd/data/autoadd.js +++ b/deluge/plugins/AutoAdd/deluge/plugins/autoadd/data/autoadd.js diff --git a/deluge/plugins/autoadd/autoadd/data/autoadd_options.glade b/deluge/plugins/AutoAdd/deluge/plugins/autoadd/data/autoadd_options.glade index ea7167e9d..ea7167e9d 100644 --- a/deluge/plugins/autoadd/autoadd/data/autoadd_options.glade +++ b/deluge/plugins/AutoAdd/deluge/plugins/autoadd/data/autoadd_options.glade diff --git a/deluge/plugins/autoadd/autoadd/data/config.glade b/deluge/plugins/AutoAdd/deluge/plugins/autoadd/data/config.glade index e051e64b1..e051e64b1 100644 --- a/deluge/plugins/autoadd/autoadd/data/config.glade +++ b/deluge/plugins/AutoAdd/deluge/plugins/autoadd/data/config.glade diff --git a/deluge/plugins/autoadd/autoadd/gtkui.py b/deluge/plugins/AutoAdd/deluge/plugins/autoadd/gtkui.py index e32d37ff6..e32d37ff6 100644 --- a/deluge/plugins/autoadd/autoadd/gtkui.py +++ b/deluge/plugins/AutoAdd/deluge/plugins/autoadd/gtkui.py diff --git a/deluge/plugins/autoadd/autoadd/webui.py b/deluge/plugins/AutoAdd/deluge/plugins/autoadd/webui.py index eab62a355..eab62a355 100644 --- a/deluge/plugins/autoadd/autoadd/webui.py +++ b/deluge/plugins/AutoAdd/deluge/plugins/autoadd/webui.py diff --git a/deluge/plugins/autoadd/setup.py b/deluge/plugins/AutoAdd/setup.py index fc563fae7..2ffe54898 100644 --- a/deluge/plugins/autoadd/setup.py +++ b/deluge/plugins/AutoAdd/setup.py @@ -38,7 +38,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__ = "AutoAdd" __author__ = "Chase Sterling, Pedro Algarvio" @@ -48,7 +48,7 @@ __url__ = "http://dev.deluge-torrent.org/wiki/Plugins/AutoAdd" __license__ = "GPLv3" __description__ = "Monitors folders for .torrent files." __long_description__ = """""" -__pkg_data__ = {__plugin_name__.lower(): ["template/*", "data/*"]} +__pkg_data__ = {'deluge.plugins.'+__plugin_name__.lower(): ["template/*", "data/*"]} setup( name=__plugin_name__, @@ -59,16 +59,16 @@ setup( url=__url__, 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/Blocklist/deluge/__init__.py b/deluge/plugins/Blocklist/deluge/__init__.py new file mode 100644 index 000000000..94033e829 --- /dev/null +++ b/deluge/plugins/Blocklist/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/Blocklist/deluge/plugins/__init__.py b/deluge/plugins/Blocklist/deluge/plugins/__init__.py new file mode 100644 index 000000000..94033e829 --- /dev/null +++ b/deluge/plugins/Blocklist/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/blocklist/blocklist/__init__.py b/deluge/plugins/Blocklist/deluge/plugins/blocklist/__init__.py index ed5ba7828..ed5ba7828 100644 --- a/deluge/plugins/blocklist/blocklist/__init__.py +++ b/deluge/plugins/Blocklist/deluge/plugins/blocklist/__init__.py diff --git a/deluge/plugins/blocklist/blocklist/common.py b/deluge/plugins/Blocklist/deluge/plugins/blocklist/common.py index c2076acae..147f77d5e 100644 --- a/deluge/plugins/blocklist/blocklist/common.py +++ b/deluge/plugins/Blocklist/deluge/plugins/blocklist/common.py @@ -40,7 +40,8 @@ from functools import wraps from sys import exc_info def get_resource(filename): - return pkg_resources.resource_filename("blocklist", os.path.join("data", filename)) + return pkg_resources.resource_filename("deluge.plugins.blocklist", + os.path.join("data", filename)) def raisesErrorsAs(error): """ @@ -73,14 +74,14 @@ def raisesErrorsAs(error): def remove_zeros(ip): """ Removes unneeded zeros from ip addresses. - + Example: 000.000.000.003 -> 0.0.0.3 - + :param ip: the ip address :type ip: string - + :returns: the ip address without the unneeded zeros :rtype: string - + """ return ".".join([part.lstrip("0").zfill(1) for part in ip.split(".")]) diff --git a/deluge/plugins/blocklist/blocklist/core.py b/deluge/plugins/Blocklist/deluge/plugins/blocklist/core.py index f6ca3f52c..f6ca3f52c 100644 --- a/deluge/plugins/blocklist/blocklist/core.py +++ b/deluge/plugins/Blocklist/deluge/plugins/blocklist/core.py diff --git a/deluge/plugins/blocklist/blocklist/data/COPYING b/deluge/plugins/Blocklist/deluge/plugins/blocklist/data/COPYING index d60c31a97..d60c31a97 100644 --- a/deluge/plugins/blocklist/blocklist/data/COPYING +++ b/deluge/plugins/Blocklist/deluge/plugins/blocklist/data/COPYING diff --git a/deluge/plugins/blocklist/blocklist/data/LICENSE b/deluge/plugins/Blocklist/deluge/plugins/blocklist/data/LICENSE index 3be3ba6a2..3be3ba6a2 100644 --- a/deluge/plugins/blocklist/blocklist/data/LICENSE +++ b/deluge/plugins/Blocklist/deluge/plugins/blocklist/data/LICENSE diff --git a/deluge/plugins/blocklist/blocklist/data/blocklist16.png b/deluge/plugins/Blocklist/deluge/plugins/blocklist/data/blocklist16.png Binary files differindex 58240de7d..58240de7d 100644 --- a/deluge/plugins/blocklist/blocklist/data/blocklist16.png +++ b/deluge/plugins/Blocklist/deluge/plugins/blocklist/data/blocklist16.png diff --git a/deluge/plugins/blocklist/blocklist/data/blocklist_download24.png b/deluge/plugins/Blocklist/deluge/plugins/blocklist/data/blocklist_download24.png Binary files differindex de73891d9..de73891d9 100644 --- a/deluge/plugins/blocklist/blocklist/data/blocklist_download24.png +++ b/deluge/plugins/Blocklist/deluge/plugins/blocklist/data/blocklist_download24.png diff --git a/deluge/plugins/blocklist/blocklist/data/blocklist_import24.png b/deluge/plugins/Blocklist/deluge/plugins/blocklist/data/blocklist_import24.png Binary files differindex ed2c75b22..ed2c75b22 100644 --- a/deluge/plugins/blocklist/blocklist/data/blocklist_import24.png +++ b/deluge/plugins/Blocklist/deluge/plugins/blocklist/data/blocklist_import24.png diff --git a/deluge/plugins/blocklist/blocklist/data/blocklist_pref.glade b/deluge/plugins/Blocklist/deluge/plugins/blocklist/data/blocklist_pref.glade index 98de5500c..98de5500c 100644 --- a/deluge/plugins/blocklist/blocklist/data/blocklist_pref.glade +++ b/deluge/plugins/Blocklist/deluge/plugins/blocklist/data/blocklist_pref.glade diff --git a/deluge/plugins/blocklist/blocklist/decompressers.py b/deluge/plugins/Blocklist/deluge/plugins/blocklist/decompressers.py index cfb3b7bd9..cfb3b7bd9 100644 --- a/deluge/plugins/blocklist/blocklist/decompressers.py +++ b/deluge/plugins/Blocklist/deluge/plugins/blocklist/decompressers.py diff --git a/deluge/plugins/blocklist/blocklist/detect.py b/deluge/plugins/Blocklist/deluge/plugins/blocklist/detect.py index a5d32b6b0..a5d32b6b0 100644 --- a/deluge/plugins/blocklist/blocklist/detect.py +++ b/deluge/plugins/Blocklist/deluge/plugins/blocklist/detect.py diff --git a/deluge/plugins/blocklist/blocklist/gtkui.py b/deluge/plugins/Blocklist/deluge/plugins/blocklist/gtkui.py index 98c858dae..98c858dae 100644 --- a/deluge/plugins/blocklist/blocklist/gtkui.py +++ b/deluge/plugins/Blocklist/deluge/plugins/blocklist/gtkui.py diff --git a/deluge/plugins/blocklist/blocklist/peerguardian.py b/deluge/plugins/Blocklist/deluge/plugins/blocklist/peerguardian.py index 2d8a0256d..2d8a0256d 100644 --- a/deluge/plugins/blocklist/blocklist/peerguardian.py +++ b/deluge/plugins/Blocklist/deluge/plugins/blocklist/peerguardian.py diff --git a/deluge/plugins/blocklist/blocklist/readers.py b/deluge/plugins/Blocklist/deluge/plugins/blocklist/readers.py index f1d9a4da7..f1d9a4da7 100644 --- a/deluge/plugins/blocklist/blocklist/readers.py +++ b/deluge/plugins/Blocklist/deluge/plugins/blocklist/readers.py diff --git a/deluge/plugins/blocklist/blocklist/webui.py b/deluge/plugins/Blocklist/deluge/plugins/blocklist/webui.py index 2c4e0de4a..2c4e0de4a 100644 --- a/deluge/plugins/blocklist/blocklist/webui.py +++ b/deluge/plugins/Blocklist/deluge/plugins/blocklist/webui.py diff --git a/deluge/plugins/blocklist/setup.py b/deluge/plugins/Blocklist/setup.py index f690278a6..ee44297f4 100644 --- a/deluge/plugins/blocklist/setup.py +++ b/deluge/plugins/Blocklist/setup.py @@ -31,7 +31,7 @@ # -from setuptools import setup +from setuptools import setup, find_packages __plugin_name__ = "Blocklist" __author__ = "John Garland" @@ -41,7 +41,7 @@ __url__ = "http://deluge-torrent.org" __license__ = "GPLv3" __description__ = "Download and import IP blocklists" __long_description__ = __description__ -__pkg_data__ = {__plugin_name__.lower(): ["data/*"]} +__pkg_data__ = {'deluge.plugins.'+__plugin_name__.lower(): ["data/*"]} setup( name=__plugin_name__, @@ -53,15 +53,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/Example/deluge/__init__.py b/deluge/plugins/Example/deluge/__init__.py new file mode 100644 index 000000000..94033e829 --- /dev/null +++ b/deluge/plugins/Example/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/Example/deluge/plugins/__init__.py b/deluge/plugins/Example/deluge/plugins/__init__.py new file mode 100644 index 000000000..94033e829 --- /dev/null +++ b/deluge/plugins/Example/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/example/example/__init__.py b/deluge/plugins/Example/deluge/plugins/example/__init__.py index aa7562bdc..aa7562bdc 100644 --- a/deluge/plugins/example/example/__init__.py +++ b/deluge/plugins/Example/deluge/plugins/example/__init__.py diff --git a/deluge/plugins/execute/execute/common.py b/deluge/plugins/Example/deluge/plugins/example/common.py index b3e3ad59c..72e3750c6 100644 --- a/deluge/plugins/execute/execute/common.py +++ b/deluge/plugins/Example/deluge/plugins/example/common.py @@ -37,4 +37,5 @@ import pkg_resources import os.path def get_resource(filename): - return pkg_resources.resource_filename("execute", os.path.join("data", filename)) + return pkg_resources.resource_filename("deluge.plugins.example", + os.path.join("data", filename)) diff --git a/deluge/plugins/example/example/core.py b/deluge/plugins/Example/deluge/plugins/example/core.py index 319580c91..319580c91 100644 --- a/deluge/plugins/example/example/core.py +++ b/deluge/plugins/Example/deluge/plugins/example/core.py diff --git a/deluge/plugins/example/example/data/example.js b/deluge/plugins/Example/deluge/plugins/example/data/example.js index 98fe87672..98fe87672 100644 --- a/deluge/plugins/example/example/data/example.js +++ b/deluge/plugins/Example/deluge/plugins/example/data/example.js diff --git a/deluge/plugins/example/example/gtkui.py b/deluge/plugins/Example/deluge/plugins/example/gtkui.py index 9227cd511..9227cd511 100644 --- a/deluge/plugins/example/example/gtkui.py +++ b/deluge/plugins/Example/deluge/plugins/example/gtkui.py diff --git a/deluge/plugins/example/example/webui.py b/deluge/plugins/Example/deluge/plugins/example/webui.py index 961cb49e7..961cb49e7 100644 --- a/deluge/plugins/example/example/webui.py +++ b/deluge/plugins/Example/deluge/plugins/example/webui.py diff --git a/deluge/plugins/example/setup.py b/deluge/plugins/Example/setup.py index c666efc18..59f8582fa 100644 --- a/deluge/plugins/example/setup.py +++ b/deluge/plugins/Example/setup.py @@ -31,7 +31,7 @@ # # -from setuptools import setup +from setuptools import setup, find_packages __plugin_name__ = "Example" __author__ = "Andrew Resch" @@ -41,7 +41,7 @@ __url__ = "http://deluge-torrent.org" __license__ = "GPLv3" __description__ = "Example plugin" __long_description__ = __description__ -__pkg_data__ = {__plugin_name__.lower(): []} +__pkg_data__ = {"deluge.plugins."+__plugin_name__.lower(): []} setup( name=__plugin_name__, @@ -53,15 +53,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 = %s:deluge.plugins.CorePlugin [deluge.plugin.gtkui] - %s = %s:GtkUIPlugin + %s = %s:deluge.plugins.GtkUIPlugin [deluge.plugin.webui] - %s = %s:WebUIPlugin + %s = %s:deluge.plugins.WebUIPlugin """ % ((__plugin_name__, __plugin_name__.lower())*3) ) diff --git a/deluge/plugins/Execute/deluge/__init__.py b/deluge/plugins/Execute/deluge/__init__.py new file mode 100644 index 000000000..94033e829 --- /dev/null +++ b/deluge/plugins/Execute/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/Execute/deluge/plugins/__init__.py b/deluge/plugins/Execute/deluge/plugins/__init__.py new file mode 100644 index 000000000..94033e829 --- /dev/null +++ b/deluge/plugins/Execute/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/execute/execute/__init__.py b/deluge/plugins/Execute/deluge/plugins/execute/__init__.py index df3aa1c75..df3aa1c75 100644 --- a/deluge/plugins/execute/execute/__init__.py +++ b/deluge/plugins/Execute/deluge/plugins/execute/__init__.py diff --git a/deluge/plugins/example/example/common.py b/deluge/plugins/Execute/deluge/plugins/execute/common.py index 71701676d..d0d33799c 100644 --- a/deluge/plugins/example/example/common.py +++ b/deluge/plugins/Execute/deluge/plugins/execute/common.py @@ -37,4 +37,5 @@ import pkg_resources import os.path def get_resource(filename): - return pkg_resources.resource_filename("example", os.path.join("data", filename)) + return pkg_resources.resource_filename("deluge.plugins.execute", + os.path.join("data", filename)) diff --git a/deluge/plugins/execute/execute/core.py b/deluge/plugins/Execute/deluge/plugins/execute/core.py index 54362b1c7..54362b1c7 100644 --- a/deluge/plugins/execute/execute/core.py +++ b/deluge/plugins/Execute/deluge/plugins/execute/core.py diff --git a/deluge/plugins/execute/execute/data/execute.js b/deluge/plugins/Execute/deluge/plugins/execute/data/execute.js index d72d303c9..d72d303c9 100644 --- a/deluge/plugins/execute/execute/data/execute.js +++ b/deluge/plugins/Execute/deluge/plugins/execute/data/execute.js diff --git a/deluge/plugins/execute/execute/data/execute_prefs.glade b/deluge/plugins/Execute/deluge/plugins/execute/data/execute_prefs.glade index e47fdb195..e47fdb195 100644 --- a/deluge/plugins/execute/execute/data/execute_prefs.glade +++ b/deluge/plugins/Execute/deluge/plugins/execute/data/execute_prefs.glade diff --git a/deluge/plugins/execute/execute/gtkui.py b/deluge/plugins/Execute/deluge/plugins/execute/gtkui.py index 3cd148a55..3cd148a55 100644 --- a/deluge/plugins/execute/execute/gtkui.py +++ b/deluge/plugins/Execute/deluge/plugins/execute/gtkui.py diff --git a/deluge/plugins/execute/execute/webui.py b/deluge/plugins/Execute/deluge/plugins/execute/webui.py index 0a29a9eb7..cf529119a 100644 --- a/deluge/plugins/execute/execute/webui.py +++ b/deluge/plugins/Execute/deluge/plugins/execute/webui.py @@ -33,7 +33,6 @@ # # -import pkg_resources from deluge.log import getPluginLogger from deluge.ui.client import client diff --git a/deluge/plugins/execute/setup.py b/deluge/plugins/Execute/setup.py index 2938e1757..ab93b6b4b 100644 --- a/deluge/plugins/execute/setup.py +++ b/deluge/plugins/Execute/setup.py @@ -31,7 +31,7 @@ # # -from setuptools import setup +from setuptools import setup, find_packages __plugin_name__ = "Execute" __author__ = "Damien Churchill" @@ -41,7 +41,7 @@ __url__ = "http://deluge-torrent.org" __license__ = "GPLv3" __description__ = "Plugin to execute a command upon an event" __long_description__ = __description__ -__pkg_data__ = {__plugin_name__.lower(): ["data/*"]} +__pkg_data__ = {"deluge.plugins."+__plugin_name__.lower(): ["data/*"]} setup( name=__plugin_name__, @@ -53,15 +53,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 = %s:deluge.plugins.CorePlugin [deluge.plugin.gtkui] - %s = %s:GtkUIPlugin + %s = %s:deluge.plugins.GtkUIPlugin [deluge.plugin.web] - %s = %s:WebUIPlugin + %s = %s:deluge.plugins.WebUIPlugin """ % ((__plugin_name__, __plugin_name__.lower())*3) ) diff --git a/deluge/plugins/Extractor/deluge/__init__.py b/deluge/plugins/Extractor/deluge/__init__.py new file mode 100644 index 000000000..94033e829 --- /dev/null +++ b/deluge/plugins/Extractor/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/Extractor/deluge/plugins/__init__.py b/deluge/plugins/Extractor/deluge/plugins/__init__.py new file mode 100644 index 000000000..94033e829 --- /dev/null +++ b/deluge/plugins/Extractor/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/extractor/extractor/__init__.py b/deluge/plugins/Extractor/deluge/plugins/extractor/__init__.py index ad38ed6b1..ad38ed6b1 100644 --- a/deluge/plugins/extractor/extractor/__init__.py +++ b/deluge/plugins/Extractor/deluge/plugins/extractor/__init__.py diff --git a/deluge/plugins/extractor/extractor/common.py b/deluge/plugins/Extractor/deluge/plugins/extractor/common.py index 66175e894..0517f41db 100644 --- a/deluge/plugins/extractor/extractor/common.py +++ b/deluge/plugins/Extractor/deluge/plugins/extractor/common.py @@ -35,4 +35,5 @@ def get_resource(filename): import pkg_resources, os - return pkg_resources.resource_filename("extractor", os.path.join("data", filename)) + return pkg_resources.resource_filename("deluge.plugins.extractor", + os.path.join("data", filename)) diff --git a/deluge/plugins/extractor/extractor/core.py b/deluge/plugins/Extractor/deluge/plugins/extractor/core.py index 03eeda1e7..03eeda1e7 100644 --- a/deluge/plugins/extractor/extractor/core.py +++ b/deluge/plugins/Extractor/deluge/plugins/extractor/core.py diff --git a/deluge/plugins/extractor/extractor/data/extractor_prefs.glade b/deluge/plugins/Extractor/deluge/plugins/extractor/data/extractor_prefs.glade index c6827e4cd..c6827e4cd 100644 --- a/deluge/plugins/extractor/extractor/data/extractor_prefs.glade +++ b/deluge/plugins/Extractor/deluge/plugins/extractor/data/extractor_prefs.glade diff --git a/deluge/plugins/extractor/extractor/gtkui.py b/deluge/plugins/Extractor/deluge/plugins/extractor/gtkui.py index d27e253ed..d27e253ed 100644 --- a/deluge/plugins/extractor/extractor/gtkui.py +++ b/deluge/plugins/Extractor/deluge/plugins/extractor/gtkui.py diff --git a/deluge/plugins/extractor/extractor/webui.py b/deluge/plugins/Extractor/deluge/plugins/extractor/webui.py index 5f198981d..5f198981d 100644 --- a/deluge/plugins/extractor/extractor/webui.py +++ b/deluge/plugins/Extractor/deluge/plugins/extractor/webui.py diff --git a/deluge/plugins/extractor/setup.py b/deluge/plugins/Extractor/setup.py index 7f3afe9b4..135d698d7 100644 --- a/deluge/plugins/extractor/setup.py +++ b/deluge/plugins/Extractor/setup.py @@ -37,7 +37,7 @@ # # -from setuptools import setup +from setuptools import setup, find_packages __plugin_name__ = "Extractor" __author__ = "Andrew Resch" @@ -47,7 +47,7 @@ __url__ = "http://deluge-torrent.org" __license__ = "GPLv3" __description__ = "Extract files upon completion" __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 = %s:deluge.plugins.CorePlugin [deluge.plugin.gtkui] - %s = %s:GtkUIPlugin + %s = %s:deluge.plugins.GtkUIPlugin [deluge.plugin.webui] - %s = %s:WebUIPlugin + %s = %s:deluge.plugins.WebUIPlugin """ % ((__plugin_name__, __plugin_name__.lower())*3) ) 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 index 994412471..994412471 100644 --- a/deluge/plugins/feeder/feeder/__init__.py +++ b/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 index ad74c1c23..ad74c1c23 100644 --- a/deluge/plugins/feeder/feeder/core.py +++ b/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 index c5c177235..c5c177235 100644 --- a/deluge/plugins/feeder/feeder/template/feeds.html +++ b/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 index b2dcd3d42..b2dcd3d42 100644 --- a/deluge/plugins/feeder/feeder/template/filter_settings.html +++ b/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 index cf2187cd3..cf2187cd3 100644 --- a/deluge/plugins/feeder/feeder/template/filters.html +++ b/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 index 662e13c5d..662e13c5d 100644 --- a/deluge/plugins/feeder/feeder/webui.py +++ b/deluge/plugins/Feeder/deluge/plugins/feeder/webui.py diff --git a/deluge/plugins/feeder/setup.py b/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/FreeSpace/create_dev_link.sh b/deluge/plugins/FreeSpace/create_dev_link.sh new file mode 100755 index 000000000..5e04057c3 --- /dev/null +++ b/deluge/plugins/FreeSpace/create_dev_link.sh @@ -0,0 +1,11 @@ +#!/bin/bash +BASEDIR=$(cd `dirname $0` && pwd) +CONFIG_DIR=$( test -z $1 && echo "" || echo "$1") +[ -d "$CONFIG_DIR/plugins" ] || echo "Config dir "$CONFIG_DIR" is either not a directory or is not a proper deluge config directory. Exiting" +[ -d "$CONFIG_DIR/plugins" ] || exit 1 +cd $BASEDIR +test -d $BASEDIR/temp || mkdir $BASEDIR/temp +export PYTHONPATH=$BASEDIR/temp +python setup.py build develop --install-dir $BASEDIR/temp +cp $BASEDIR/temp/*.egg-link $CONFIG_DIR/plugins +rm -fr $BASEDIR/temp diff --git a/deluge/plugins/FreeSpace/deluge/__init__.py b/deluge/plugins/FreeSpace/deluge/__init__.py new file mode 100644 index 000000000..94033e829 --- /dev/null +++ b/deluge/plugins/FreeSpace/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/FreeSpace/deluge/plugins/__init__.py b/deluge/plugins/FreeSpace/deluge/plugins/__init__.py new file mode 100644 index 000000000..94033e829 --- /dev/null +++ b/deluge/plugins/FreeSpace/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/freespace/freespace/__init__.py b/deluge/plugins/FreeSpace/deluge/plugins/freespace/__init__.py index b09dc0f57..b09dc0f57 100644 --- a/deluge/plugins/freespace/freespace/__init__.py +++ b/deluge/plugins/FreeSpace/deluge/plugins/freespace/__init__.py diff --git a/deluge/plugins/freespace/freespace/common.py b/deluge/plugins/FreeSpace/deluge/plugins/freespace/common.py index 8bdce351f..647e03519 100644 --- a/deluge/plugins/freespace/freespace/common.py +++ b/deluge/plugins/FreeSpace/deluge/plugins/freespace/common.py @@ -39,4 +39,5 @@ def get_resource(filename): import pkg_resources, os - return pkg_resources.resource_filename("freespace", os.path.join("data", filename)) + return pkg_resources.resource_filename("deluge.plugins.freespace", + os.path.join("data", filename)) diff --git a/deluge/plugins/freespace/freespace/core.py b/deluge/plugins/FreeSpace/deluge/plugins/freespace/core.py index eb90ecb68..eb90ecb68 100644 --- a/deluge/plugins/freespace/freespace/core.py +++ b/deluge/plugins/FreeSpace/deluge/plugins/freespace/core.py diff --git a/deluge/plugins/freespace/freespace/data/config.glade b/deluge/plugins/FreeSpace/deluge/plugins/freespace/data/config.glade index 15d771f5c..15d771f5c 100644 --- a/deluge/plugins/freespace/freespace/data/config.glade +++ b/deluge/plugins/FreeSpace/deluge/plugins/freespace/data/config.glade diff --git a/deluge/plugins/freespace/freespace/data/freespace.js b/deluge/plugins/FreeSpace/deluge/plugins/freespace/data/freespace.js index 745e09820..745e09820 100644 --- a/deluge/plugins/freespace/freespace/data/freespace.js +++ b/deluge/plugins/FreeSpace/deluge/plugins/freespace/data/freespace.js diff --git a/deluge/plugins/freespace/freespace/gtkui.py b/deluge/plugins/FreeSpace/deluge/plugins/freespace/gtkui.py index 21405ccda..21405ccda 100644 --- a/deluge/plugins/freespace/freespace/gtkui.py +++ b/deluge/plugins/FreeSpace/deluge/plugins/freespace/gtkui.py diff --git a/deluge/plugins/freespace/freespace/webui.py b/deluge/plugins/FreeSpace/deluge/plugins/freespace/webui.py index a2686597b..a2686597b 100644 --- a/deluge/plugins/freespace/freespace/webui.py +++ b/deluge/plugins/FreeSpace/deluge/plugins/freespace/webui.py diff --git a/deluge/plugins/freespace/setup.py b/deluge/plugins/FreeSpace/setup.py index 1d2ad7c05..74d53d0f2 100755 --- a/deluge/plugins/freespace/setup.py +++ b/deluge/plugins/FreeSpace/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__ = "FreeSpace" __author__ = "Pedro Algarvio" @@ -47,7 +47,7 @@ __url__ = "http://deluge.ufsoft.org/hg/Notification/" __license__ = "GPLv3" __description__ = "Plugin which continuously checks for available free space." __long_description__ = __description__ -__pkg_data__ = {__plugin_name__.lower(): ["template/*", "data/*"]} +__pkg_data__ = {"deluge.plugins."+__plugin_name__.lower(): ["template/*", "data/*"]} setup( name=__plugin_name__, @@ -59,13 +59,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/plugins/label/TODO b/deluge/plugins/Label/TODO index 0ee04e2c0..0ee04e2c0 100644 --- a/deluge/plugins/label/TODO +++ b/deluge/plugins/Label/TODO diff --git a/deluge/plugins/Label/deluge/__init__.py b/deluge/plugins/Label/deluge/__init__.py new file mode 100644 index 000000000..94033e829 --- /dev/null +++ b/deluge/plugins/Label/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/Label/deluge/plugins/__init__.py b/deluge/plugins/Label/deluge/plugins/__init__.py new file mode 100644 index 000000000..94033e829 --- /dev/null +++ b/deluge/plugins/Label/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/label/label/__init__.py b/deluge/plugins/Label/deluge/plugins/label/__init__.py index e300bd16e..e300bd16e 100644 --- a/deluge/plugins/label/label/__init__.py +++ b/deluge/plugins/Label/deluge/plugins/label/__init__.py diff --git a/deluge/plugins/label/label/core.py b/deluge/plugins/Label/deluge/plugins/label/core.py index 5c76f5d19..5c76f5d19 100644 --- a/deluge/plugins/label/label/core.py +++ b/deluge/plugins/Label/deluge/plugins/label/core.py diff --git a/deluge/plugins/label/label/data/label.js b/deluge/plugins/Label/deluge/plugins/label/data/label.js index 8ae0584bc..8ae0584bc 100644 --- a/deluge/plugins/label/label/data/label.js +++ b/deluge/plugins/Label/deluge/plugins/label/data/label.js diff --git a/deluge/plugins/label/label/data/label_options.glade b/deluge/plugins/Label/deluge/plugins/label/data/label_options.glade index 0316d2205..0316d2205 100644 --- a/deluge/plugins/label/label/data/label_options.glade +++ b/deluge/plugins/Label/deluge/plugins/label/data/label_options.glade diff --git a/deluge/plugins/label/label/data/label_pref.glade b/deluge/plugins/Label/deluge/plugins/label/data/label_pref.glade index a25c613a5..a25c613a5 100644 --- a/deluge/plugins/label/label/data/label_pref.glade +++ b/deluge/plugins/Label/deluge/plugins/label/data/label_pref.glade diff --git a/deluge/plugins/label/label/gtkui/__init__.py b/deluge/plugins/Label/deluge/plugins/label/gtkui/__init__.py index 81dbe8e52..81dbe8e52 100644 --- a/deluge/plugins/label/label/gtkui/__init__.py +++ b/deluge/plugins/Label/deluge/plugins/label/gtkui/__init__.py diff --git a/deluge/plugins/label/label/gtkui/label_config.py b/deluge/plugins/Label/deluge/plugins/label/gtkui/label_config.py index 1288f7165..1288f7165 100644 --- a/deluge/plugins/label/label/gtkui/label_config.py +++ b/deluge/plugins/Label/deluge/plugins/label/gtkui/label_config.py diff --git a/deluge/plugins/label/label/gtkui/sidebar_menu.py b/deluge/plugins/Label/deluge/plugins/label/gtkui/sidebar_menu.py index 0bcfb0835..0bcfb0835 100644 --- a/deluge/plugins/label/label/gtkui/sidebar_menu.py +++ b/deluge/plugins/Label/deluge/plugins/label/gtkui/sidebar_menu.py diff --git a/deluge/plugins/label/label/gtkui/submenu.py b/deluge/plugins/Label/deluge/plugins/label/gtkui/submenu.py index a2e12ea57..a2e12ea57 100644 --- a/deluge/plugins/label/label/gtkui/submenu.py +++ b/deluge/plugins/Label/deluge/plugins/label/gtkui/submenu.py diff --git a/deluge/plugins/label/label/test.py b/deluge/plugins/Label/deluge/plugins/label/test.py index 50a8b3180..50a8b3180 100644 --- a/deluge/plugins/label/label/test.py +++ b/deluge/plugins/Label/deluge/plugins/label/test.py diff --git a/deluge/plugins/label/label/webui.py b/deluge/plugins/Label/deluge/plugins/label/webui.py index 4025317b5..1cf7f4c0c 100644 --- a/deluge/plugins/label/label/webui.py +++ b/deluge/plugins/Label/deluge/plugins/label/webui.py @@ -48,7 +48,8 @@ from deluge import component log = getPluginLogger(__name__) def get_resource(filename): - return pkg_resources.resource_filename("label", os.path.join("data", filename)) + return pkg_resources.resource_filename("deluge.plugins.label", + os.path.join("data", filename)) class WebUI(WebPluginBase): diff --git a/deluge/plugins/label/setup.py b/deluge/plugins/Label/setup.py index d196edaf1..65d36bf53 100644 --- a/deluge/plugins/label/setup.py +++ b/deluge/plugins/Label/setup.py @@ -31,7 +31,7 @@ # -from setuptools import setup +from setuptools import setup, find_packages __plugin_name__ = "Label" __author__ = "Martijn Voncken" @@ -45,7 +45,7 @@ Allows labels to be assigned to torrents Also offers filters on state, tracker and keywords """ -__pkg_data__ = {__plugin_name__.lower(): ["template/*", "data/*"]} +__pkg_data__ = {"deluge.plugins."+__plugin_name__.lower(): ["template/*", "data/*"]} setup( name=__plugin_name__, @@ -57,15 +57,16 @@ setup( license=__license__, long_description=__long_description__, - packages=[__plugin_name__.lower(), "label.gtkui"], + 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/Notifications/create_dev_link.sh b/deluge/plugins/Notifications/create_dev_link.sh new file mode 100755 index 000000000..5e04057c3 --- /dev/null +++ b/deluge/plugins/Notifications/create_dev_link.sh @@ -0,0 +1,11 @@ +#!/bin/bash +BASEDIR=$(cd `dirname $0` && pwd) +CONFIG_DIR=$( test -z $1 && echo "" || echo "$1") +[ -d "$CONFIG_DIR/plugins" ] || echo "Config dir "$CONFIG_DIR" is either not a directory or is not a proper deluge config directory. Exiting" +[ -d "$CONFIG_DIR/plugins" ] || exit 1 +cd $BASEDIR +test -d $BASEDIR/temp || mkdir $BASEDIR/temp +export PYTHONPATH=$BASEDIR/temp +python setup.py build develop --install-dir $BASEDIR/temp +cp $BASEDIR/temp/*.egg-link $CONFIG_DIR/plugins +rm -fr $BASEDIR/temp 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 index b09dc0f57..b09dc0f57 100644 --- a/deluge/plugins/notifications/notifications/__init__.py +++ b/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 index 98a7828b4..1c6cb52b0 100644 --- a/deluge/plugins/notifications/notifications/common.py +++ b/deluge/plugins/Notifications/deluge/plugins/notifications/common.py @@ -52,7 +52,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 index 29cb6c3c9..5b01ca8b4 100644 --- a/deluge/plugins/notifications/notifications/core.py +++ b/deluge/plugins/Notifications/deluge/plugins/notifications/core.py @@ -47,7 +47,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 log = getPluginLogger(__name__) diff --git a/deluge/plugins/notifications/notifications/data/config.glade b/deluge/plugins/Notifications/deluge/plugins/notifications/data/config.glade index 4da1de6bd..4da1de6bd 100644 --- a/deluge/plugins/notifications/notifications/data/config.glade +++ b/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 index 46384d0bc..46384d0bc 100644 --- a/deluge/plugins/notifications/notifications/data/notifications.js +++ b/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 index 79b272ac8..79b272ac8 100644 --- a/deluge/plugins/notifications/notifications/gtkui.py +++ b/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 index 648d4ad0c..648d4ad0c 100644 --- a/deluge/plugins/notifications/notifications/test.py +++ b/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 index 9ab62bdf9..9ab62bdf9 100644 --- a/deluge/plugins/notifications/notifications/webui.py +++ b/deluge/plugins/Notifications/deluge/plugins/notifications/webui.py diff --git a/deluge/plugins/notifications/setup.py b/deluge/plugins/Notifications/setup.py index a12a67e37..d8c566153 100755 --- a/deluge/plugins/notifications/setup.py +++ b/deluge/plugins/Notifications/setup.py @@ -54,7 +54,7 @@ Email, Popup, Blink and Sound notifications 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__, @@ -67,12 +67,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 index f32865f92..f32865f92 100644 --- a/deluge/plugins/scheduler/scheduler/__init__.py +++ b/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 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 index c4b13d492..c4b13d492 100644 --- a/deluge/plugins/scheduler/scheduler/core.py +++ b/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 Binary files differindex 3118c7430..3118c7430 100644 --- a/deluge/plugins/scheduler/scheduler/data/green.png +++ b/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 Binary files differindex 90f532609..90f532609 100644 --- a/deluge/plugins/scheduler/scheduler/data/red.png +++ b/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 index 79639031a..79639031a 100644 --- a/deluge/plugins/scheduler/scheduler/data/scheduler.js +++ b/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 Binary files differindex 11146b996..11146b996 100644 --- a/deluge/plugins/scheduler/scheduler/data/yellow.png +++ b/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 index 739f29ab5..739f29ab5 100644 --- a/deluge/plugins/scheduler/scheduler/gtkui.py +++ b/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 index fd06cfe8e..fd06cfe8e 100644 --- a/deluge/plugins/scheduler/scheduler/webui.py +++ b/deluge/plugins/Scheduler/deluge/plugins/scheduler/webui.py diff --git a/deluge/plugins/scheduler/setup.py b/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 new file mode 100755 index 000000000..5e04057c3 --- /dev/null +++ b/deluge/plugins/Stats/create_dev_link.sh @@ -0,0 +1,11 @@ +#!/bin/bash +BASEDIR=$(cd `dirname $0` && pwd) +CONFIG_DIR=$( test -z $1 && echo "" || echo "$1") +[ -d "$CONFIG_DIR/plugins" ] || echo "Config dir "$CONFIG_DIR" is either not a directory or is not a proper deluge config directory. Exiting" +[ -d "$CONFIG_DIR/plugins" ] || exit 1 +cd $BASEDIR +test -d $BASEDIR/temp || mkdir $BASEDIR/temp +export PYTHONPATH=$BASEDIR/temp +python setup.py build develop --install-dir $BASEDIR/temp +cp $BASEDIR/temp/*.egg-link $CONFIG_DIR/plugins +rm -fr $BASEDIR/temp 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 index 09d38103c..09d38103c 100644 --- a/deluge/plugins/stats/stats/__init__.py +++ b/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 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 index b16aa7c8f..b16aa7c8f 100644 --- a/deluge/plugins/stats/stats/core.py +++ b/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 index e39b5204b..e39b5204b 100644 --- a/deluge/plugins/stats/stats/data/config.glade +++ b/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 index 57bde50e3..57bde50e3 100644 --- a/deluge/plugins/stats/stats/data/stats.js +++ b/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 index c3616a6a5..c3616a6a5 100644 --- a/deluge/plugins/stats/stats/data/tabs.glade +++ b/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 index 8432bc2e9..8432bc2e9 100644 --- a/deluge/plugins/stats/stats/graph.py +++ b/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 index b2ed73730..b2ed73730 100644 --- a/deluge/plugins/stats/stats/gtkui.py +++ b/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 index 7af5f1502..7af5f1502 100644 --- a/deluge/plugins/stats/stats/test.html +++ b/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 index 373e97032..373e97032 100644 --- a/deluge/plugins/stats/stats/test.py +++ b/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 index 937c39b5e..937c39b5e 100644 --- a/deluge/plugins/stats/stats/test.sh +++ b/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 index ff64877ca..ff64877ca 100644 --- a/deluge/plugins/stats/stats/test_total.py +++ b/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 index d78ff86c9..d78ff86c9 100644 --- a/deluge/plugins/stats/stats/webui.py +++ b/deluge/plugins/Stats/deluge/plugins/stats/webui.py diff --git a/deluge/plugins/stats/setup.py b/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 index 626b4cd6f..626b4cd6f 100644 --- a/deluge/plugins/toggle/toggle/__init__.py +++ b/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 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 index 1e229c180..1e229c180 100644 --- a/deluge/plugins/toggle/toggle/core.py +++ b/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 index 2aa5225ba..2aa5225ba 100644 --- a/deluge/plugins/toggle/toggle/data/toggle.js +++ b/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 index eb2941269..eb2941269 100644 --- a/deluge/plugins/toggle/toggle/gtkui.py +++ b/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 index 023085a05..023085a05 100644 --- a/deluge/plugins/toggle/toggle/webui.py +++ b/deluge/plugins/Toggle/deluge/plugins/toggle/webui.py diff --git a/deluge/plugins/toggle/setup.py b/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 new file mode 100755 index 000000000..f4d60d2ae --- /dev/null +++ b/deluge/plugins/WebUi/create_dev_link.sh @@ -0,0 +1,11 @@ +#!/bin/bash +BASEDIR=$(cd `dirname $0` && pwd) +CONFIG_DIR=$( test -z $1 && echo "/home/damien/.config/deluge/" || echo "$1") +[ -d "$CONFIG_DIR/plugins" ] || echo "Config dir "$CONFIG_DIR" is either not a directory or is not a proper deluge config directory. Exiting" +[ -d "$CONFIG_DIR/plugins" ] || exit 1 +cd $BASEDIR +test -d $BASEDIR/temp || mkdir $BASEDIR/temp +export PYTHONPATH=$BASEDIR/temp +python setup.py build develop --install-dir $BASEDIR/temp +cp $BASEDIR/temp/*.egg-link $CONFIG_DIR/plugins +rm -fr $BASEDIR/temp 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 index 3cf56dd9d..3cf56dd9d 100644 --- a/deluge/plugins/webui/webui/__init__.py +++ b/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 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 index 3f5fb8686..3f5fb8686 100644 --- a/deluge/plugins/webui/webui/core.py +++ b/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 index 820053bc1..820053bc1 100644 --- a/deluge/plugins/webui/webui/data/config.glade +++ b/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 index 47b02e9ab..47b02e9ab 100644 --- a/deluge/plugins/webui/webui/gtkui.py +++ b/deluge/plugins/WebUi/deluge/plugins/webui/gtkui.py diff --git a/deluge/plugins/webui/setup.py b/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/plugins/__init__.py b/deluge/plugins/__init__.py index e69de29bb..94033e829 100644 --- a/deluge/plugins/__init__.py +++ b/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/freespace/create_dev_link.sh b/deluge/plugins/freespace/create_dev_link.sh deleted file mode 100755 index be73dcaeb..000000000 --- a/deluge/plugins/freespace/create_dev_link.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash -cd /home/vampas/projects/DelugeNotify/deluge/plugins/freespace -mkdir temp -export PYTHONPATH=./temp -python setup.py build develop --install-dir ./temp -cp ./temp/FreeSpace.egg-link .config/plugins -rm -fr ./temp diff --git a/deluge/plugins/notifications/create_dev_link.sh b/deluge/plugins/notifications/create_dev_link.sh deleted file mode 100755 index fddef345f..000000000 --- a/deluge/plugins/notifications/create_dev_link.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash -cd /home/vampas/projects/DelugeNotify/deluge/plugins/notifications -mkdir temp -export PYTHONPATH=./temp -python setup.py build develop --install-dir ./temp -cp ./temp/Notifications.egg-link .config//plugins -rm -fr ./temp diff --git a/deluge/plugins/stats/create_dev_link.sh b/deluge/plugins/stats/create_dev_link.sh deleted file mode 100755 index 35e5c2a5c..000000000 --- a/deluge/plugins/stats/create_dev_link.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash -mkdir temp -export PYTHONPATH=./temp -python setup.py develop --install-dir ./temp -cp ./temp/Stats.egg-link ~/.config/deluge/plugins -rm -fr ./temp diff --git a/deluge/plugins/webui/create_dev_link.sh b/deluge/plugins/webui/create_dev_link.sh deleted file mode 100755 index 6d3af263f..000000000 --- a/deluge/plugins/webui/create_dev_link.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash -cd /home/damien/Projects/deluge/deluge/plugins/webui -mkdir temp -export PYTHONPATH=./temp -python setup.py build develop --install-dir ./temp -cp ./temp/WebUi.egg-link /home/damien/.config/deluge/plugins -rm -fr ./temp diff --git a/deluge/scripts/create_plugin.py b/deluge/scripts/create_plugin.py index eac7b54dd..a26b1e6ae 100644 --- a/deluge/scripts/create_plugin.py +++ b/deluge/scripts/create_plugin.py @@ -13,6 +13,7 @@ import os import deluge.common parser = OptionParser() parser.add_option("-n", "--name", dest="name",help="plugin name") +parser.add_option("-m", "--module-name", dest="module",help="plugin name") parser.add_option("-p", "--basepath", dest="path",help="base path") parser.add_option("-a", "--author-name", dest="author_name",help="author name,for the GPL header") parser.add_option("-e", "--author-email", dest="author_email",help="author email,for the GPL header") @@ -47,42 +48,54 @@ def create_plugin(): if not options.configdir: options.configdir = deluge.common.get_default_config_dir() - name = options.name.replace(" ", "_") + options.configdir = os.path.realpath(options.configdir) + + real_name = options.name + name = real_name.replace(" ", "_") safe_name = name.lower() - plugin_base = os.path.realpath(os.path.join(options.path, safe_name)) - src = os.path.join(plugin_base, safe_name) + if options.module: + safe_name = options.module.lower() + plugin_base = os.path.realpath(os.path.join(options.path, name)) + deluge_namespace = os.path.join(plugin_base, "deluge") + plugins_namespace = os.path.join(deluge_namespace, "plugins") + src = os.path.join(plugins_namespace, safe_name) data_dir = os.path.join(src, "data") if os.path.exists(plugin_base): print "the directory %s already exists, delete it first" % plugin_base return - def write_file(path, filename, template): - args = {"author_name":options.author_name, - "author_email":options.author_email , - "name":name, - "safe_name":safe_name, - "filename":filename, - "plugin_base":plugin_base, - "url": options.url, - "configdir": options.configdir, + def write_file(path, filename, template, include_gpl=True): + args = { + "author_name": options.author_name, + "author_email": options.author_email, + "name": name, + "safe_name": safe_name, + "filename": filename, + "plugin_base": plugin_base, + "url": options.url, + "configdir": options.configdir, "current_year": datetime.utcnow().year } filename = os.path.join(path, filename) f = open(filename,"w") - if filename.endswith(".py"): + if filename.endswith(".py") and include_gpl: f.write(GPL % args) f.write(template % args) f.close() print "creating folders.." os.mkdir(plugin_base) + os.mkdir(deluge_namespace) + os.mkdir(plugins_namespace) os.mkdir(src) os.mkdir(data_dir) print "creating files.." write_file(plugin_base,"setup.py", SETUP) + write_file(deluge_namespace, "__init__.py", NAMESPACE_INIT, False) + write_file(plugins_namespace, "__init__.py", NAMESPACE_INIT, False) write_file(src,"__init__.py", INIT) write_file(src,"gtkui.py", GTKUI) write_file(src,"webui.py", WEBUI) @@ -94,7 +107,7 @@ def create_plugin(): #add an input parameter for this? print "building dev-link.." write_file(plugin_base,"create_dev_link.sh", CREATE_DEV_LINK) - dev_link_path = os.path.realpath(os.path.join(plugin_base, "create_dev_link.sh")) + dev_link_path = os.path.join(plugin_base, "create_dev_link.sh") os.system("chmod +x %s" % dev_link_path) #lazy.. os.system(dev_link_path) @@ -156,7 +169,7 @@ class WebUIPlugin(PluginInitBase): SETUP = """ -from setuptools import setup +from setuptools import setup, find_packages __plugin_name__ = "%(name)s" __author__ = "%(author_name)s" @@ -166,7 +179,7 @@ __url__ = "%(url)s" __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__, @@ -178,17 +191,18 @@ 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 + %%(plugin_name)s = deluge.plugins.%%(plugin_module)s:CorePlugin [deluge.plugin.gtkui] - %%s = %%s:GtkUIPlugin + %%(plugin_name)s = deluge.plugins.%%(plugin_module)s:GtkUIPlugin [deluge.plugin.web] - %%s = %%s:WebUIPlugin - \"\"\" %% ((__plugin_name__, __plugin_name__.lower())*3) + %%(plugin_name)s = deluge.plugins.%%(plugin_module)s:WebUIPlugin + \"\"\" %% dict(plugin_name=__plugin_name__, plugin_module=__plugin_name__.lower()) ) """ @@ -196,7 +210,8 @@ COMMON = """ def get_resource(filename): import pkg_resources, os - return pkg_resources.resource_filename("%(safe_name)s", os.path.join("data", filename)) + return pkg_resources.resource_filename("deluge.plugins.%(safe_name)s", + os.path.join("data", filename)) """ GTKUI = """ @@ -383,13 +398,22 @@ GPL = """# # """ +NAMESPACE_INIT="""# this is a namespace package +import pkg_resources +pkg_resources.declare_namespace(__name__) +""" + CREATE_DEV_LINK = """#!/bin/bash -cd %(plugin_base)s -mkdir temp -export PYTHONPATH=./temp -python setup.py build develop --install-dir ./temp -cp ./temp/%(name)s.egg-link %(configdir)s/plugins -rm -fr ./temp +BASEDIR=$(cd `dirname $0` && pwd) +CONFIG_DIR=$( test -z $1 && echo "%(configdir)s" || echo "$1") +[ -d "$CONFIG_DIR/plugins" ] || echo "Config dir \"$CONFIG_DIR\" is either not a directory or is not a proper deluge config directory. Exiting" +[ -d "$CONFIG_DIR/plugins" ] || exit 1 +cd $BASEDIR +test -d $BASEDIR/temp || mkdir $BASEDIR/temp +export PYTHONPATH=$BASEDIR/temp +python setup.py build develop --install-dir $BASEDIR/temp +cp $BASEDIR/temp/*.egg-link $CONFIG_DIR/plugins +rm -fr $BASEDIR/temp """ create_plugin() |