diff options
author | Calum Lind <calumlind+deluge@gmail.com> | 2019-05-14 14:41:58 +0100 |
---|---|---|
committer | Calum Lind <calumlind+deluge@gmail.com> | 2019-05-15 19:20:08 +0100 |
commit | 535b13b5f1b7b7d3d104da14c4cb2a4a9502bfe0 (patch) | |
tree | fa43cf0e74dd14bc5d49dd1980997b1ae36778ea | |
parent | d6a0276a78ff99f1a0ee7faf421e048d5edbf693 (diff) | |
download | deluge-535b13b5f1b7b7d3d104da14c4cb2a4a9502bfe0.tar.gz deluge-535b13b5f1b7b7d3d104da14c4cb2a4a9502bfe0.tar.bz2 deluge-535b13b5f1b7b7d3d104da14c4cb2a4a9502bfe0.zip |
[Plugins] Convert plugins to `deluge_` module prefix convention
This commit reverts namespace for the plugins and uses a module prefix
"deluge_" in it's place. The distribution package name remains the same
for now but will also be considered to use a prefix to help find the
third-party plugins e.g. Deluge-{Plugin} and the pluginmanager will
strip the prefix for displaying.
The change is a result of problems trying to package Deluge with
pyinstaller and the pkg_resources namespaces is not compatible.
Testing alternatives to using the pkgutil or PEP420 (native) namespaces
did not yield any joy either as importing eggs with namespaces does not
work. [1]
At this point importable eggs are considered deprecated but there is no
viable alternative yet. [2]
[1] https://github.com/pypa/packaging-problems/issues/212
[2] https://github.com/pypa/packaging-problems/issues/244
-rw-r--r-- | deluge/__init__.py | 1 | ||||
-rw-r--r-- | deluge/plugins/AutoAdd/deluge/__init__.py | 1 | ||||
-rw-r--r-- | deluge/plugins/AutoAdd/deluge/plugins/__init__.py | 1 | ||||
-rw-r--r-- | deluge/plugins/AutoAdd/deluge_autoadd/__init__.py (renamed from deluge/plugins/AutoAdd/deluge/plugins/autoadd/__init__.py) | 0 | ||||
-rw-r--r-- | deluge/plugins/AutoAdd/deluge_autoadd/common.py (renamed from deluge/plugins/AutoAdd/deluge/plugins/autoadd/common.py) | 2 | ||||
-rw-r--r-- | deluge/plugins/AutoAdd/deluge_autoadd/core.py (renamed from deluge/plugins/AutoAdd/deluge/plugins/autoadd/core.py) | 0 | ||||
-rw-r--r-- | deluge/plugins/AutoAdd/deluge_autoadd/data/autoadd.js (renamed from deluge/plugins/AutoAdd/deluge/plugins/autoadd/data/autoadd.js) | 0 | ||||
-rw-r--r-- | deluge/plugins/AutoAdd/deluge_autoadd/data/autoadd_options.js (renamed from deluge/plugins/AutoAdd/deluge/plugins/autoadd/data/autoadd_options.js) | 0 | ||||
-rw-r--r-- | deluge/plugins/AutoAdd/deluge_autoadd/data/autoadd_options.ui (renamed from deluge/plugins/AutoAdd/deluge/plugins/autoadd/data/autoadd_options.ui) | 0 | ||||
-rw-r--r-- | deluge/plugins/AutoAdd/deluge_autoadd/data/autoadd_options/main_tab.js (renamed from deluge/plugins/AutoAdd/deluge/plugins/autoadd/data/autoadd_options/main_tab.js) | 0 | ||||
-rw-r--r-- | deluge/plugins/AutoAdd/deluge_autoadd/data/autoadd_options/options_tab.js (renamed from deluge/plugins/AutoAdd/deluge/plugins/autoadd/data/autoadd_options/options_tab.js) | 0 | ||||
-rw-r--r-- | deluge/plugins/AutoAdd/deluge_autoadd/data/config.ui (renamed from deluge/plugins/AutoAdd/deluge/plugins/autoadd/data/config.ui) | 0 | ||||
-rw-r--r-- | deluge/plugins/AutoAdd/deluge_autoadd/gtkui.py (renamed from deluge/plugins/AutoAdd/deluge/plugins/autoadd/gtkui.py) | 0 | ||||
-rw-r--r-- | deluge/plugins/AutoAdd/deluge_autoadd/webui.py (renamed from deluge/plugins/AutoAdd/deluge/plugins/autoadd/webui.py) | 0 | ||||
-rw-r--r-- | deluge/plugins/AutoAdd/setup.py | 11 | ||||
-rw-r--r-- | deluge/plugins/Blocklist/deluge/__init__.py | 1 | ||||
-rw-r--r-- | deluge/plugins/Blocklist/deluge/plugins/__init__.py | 1 | ||||
-rw-r--r-- | deluge/plugins/Blocklist/deluge_blocklist/__init__.py (renamed from deluge/plugins/Blocklist/deluge/plugins/blocklist/__init__.py) | 0 | ||||
-rw-r--r-- | deluge/plugins/Blocklist/deluge_blocklist/common.py (renamed from deluge/plugins/Blocklist/deluge/plugins/blocklist/common.py) | 2 | ||||
-rw-r--r-- | deluge/plugins/Blocklist/deluge_blocklist/core.py (renamed from deluge/plugins/Blocklist/deluge/plugins/blocklist/core.py) | 0 | ||||
-rw-r--r-- | deluge/plugins/Blocklist/deluge_blocklist/data/blocklist.js (renamed from deluge/plugins/Blocklist/deluge/plugins/blocklist/data/blocklist.js) | 0 | ||||
-rw-r--r-- | deluge/plugins/Blocklist/deluge_blocklist/data/blocklist16.png (renamed from deluge/plugins/Blocklist/deluge/plugins/blocklist/data/blocklist16.png) | bin | 586 -> 586 bytes | |||
-rw-r--r-- | deluge/plugins/Blocklist/deluge_blocklist/data/blocklist_download24.png (renamed from deluge/plugins/Blocklist/deluge/plugins/blocklist/data/blocklist_download24.png) | bin | 764 -> 764 bytes | |||
-rw-r--r-- | deluge/plugins/Blocklist/deluge_blocklist/data/blocklist_import24.png (renamed from deluge/plugins/Blocklist/deluge/plugins/blocklist/data/blocklist_import24.png) | bin | 1176 -> 1176 bytes | |||
-rw-r--r-- | deluge/plugins/Blocklist/deluge_blocklist/data/blocklist_pref.ui (renamed from deluge/plugins/Blocklist/deluge/plugins/blocklist/data/blocklist_pref.ui) | 0 | ||||
-rw-r--r-- | deluge/plugins/Blocklist/deluge_blocklist/decompressers.py (renamed from deluge/plugins/Blocklist/deluge/plugins/blocklist/decompressers.py) | 0 | ||||
-rw-r--r-- | deluge/plugins/Blocklist/deluge_blocklist/detect.py (renamed from deluge/plugins/Blocklist/deluge/plugins/blocklist/detect.py) | 0 | ||||
-rw-r--r-- | deluge/plugins/Blocklist/deluge_blocklist/gtkui.py (renamed from deluge/plugins/Blocklist/deluge/plugins/blocklist/gtkui.py) | 0 | ||||
-rw-r--r-- | deluge/plugins/Blocklist/deluge_blocklist/peerguardian.py (renamed from deluge/plugins/Blocklist/deluge/plugins/blocklist/peerguardian.py) | 0 | ||||
-rw-r--r-- | deluge/plugins/Blocklist/deluge_blocklist/readers.py (renamed from deluge/plugins/Blocklist/deluge/plugins/blocklist/readers.py) | 0 | ||||
-rw-r--r-- | deluge/plugins/Blocklist/deluge_blocklist/webui.py (renamed from deluge/plugins/Blocklist/deluge/plugins/blocklist/webui.py) | 0 | ||||
-rw-r--r-- | deluge/plugins/Blocklist/setup.py | 9 | ||||
-rw-r--r-- | deluge/plugins/Execute/deluge/__init__.py | 1 | ||||
-rw-r--r-- | deluge/plugins/Execute/deluge/plugins/__init__.py | 1 | ||||
-rw-r--r-- | deluge/plugins/Execute/deluge/plugins/execute/common.py | 23 | ||||
-rw-r--r-- | deluge/plugins/Execute/deluge_execute/__init__.py (renamed from deluge/plugins/Execute/deluge/plugins/execute/__init__.py) | 0 | ||||
-rw-r--r-- | deluge/plugins/Execute/deluge_execute/common.py (renamed from deluge/plugins/Label/deluge/plugins/label/common.py) | 2 | ||||
-rw-r--r-- | deluge/plugins/Execute/deluge_execute/core.py (renamed from deluge/plugins/Execute/deluge/plugins/execute/core.py) | 0 | ||||
-rw-r--r-- | deluge/plugins/Execute/deluge_execute/data/execute.js (renamed from deluge/plugins/Execute/deluge/plugins/execute/data/execute.js) | 0 | ||||
-rw-r--r-- | deluge/plugins/Execute/deluge_execute/data/execute_prefs.ui (renamed from deluge/plugins/Execute/deluge/plugins/execute/data/execute_prefs.ui) | 0 | ||||
-rw-r--r-- | deluge/plugins/Execute/deluge_execute/gtkui.py (renamed from deluge/plugins/Execute/deluge/plugins/execute/gtkui.py) | 0 | ||||
-rw-r--r-- | deluge/plugins/Execute/deluge_execute/webui.py (renamed from deluge/plugins/Execute/deluge/plugins/execute/webui.py) | 0 | ||||
-rw-r--r-- | deluge/plugins/Execute/setup.py | 9 | ||||
-rw-r--r-- | deluge/plugins/Extractor/deluge/__init__.py | 1 | ||||
-rw-r--r-- | deluge/plugins/Extractor/deluge/plugins/__init__.py | 1 | ||||
-rw-r--r-- | deluge/plugins/Extractor/deluge/plugins/extractor/common.py | 23 | ||||
-rw-r--r-- | deluge/plugins/Extractor/deluge_extractor/__init__.py (renamed from deluge/plugins/Extractor/deluge/plugins/extractor/__init__.py) | 0 | ||||
-rw-r--r-- | deluge/plugins/Extractor/deluge_extractor/common.py (renamed from deluge/plugins/WebUi/deluge/plugins/webui/common.py) | 2 | ||||
-rw-r--r-- | deluge/plugins/Extractor/deluge_extractor/core.py (renamed from deluge/plugins/Extractor/deluge/plugins/extractor/core.py) | 0 | ||||
-rw-r--r-- | deluge/plugins/Extractor/deluge_extractor/data/extractor.js (renamed from deluge/plugins/Extractor/deluge/plugins/extractor/data/extractor.js) | 0 | ||||
-rw-r--r-- | deluge/plugins/Extractor/deluge_extractor/data/extractor_prefs.ui (renamed from deluge/plugins/Extractor/deluge/plugins/extractor/data/extractor_prefs.ui) | 0 | ||||
-rw-r--r-- | deluge/plugins/Extractor/deluge_extractor/gtkui.py (renamed from deluge/plugins/Extractor/deluge/plugins/extractor/gtkui.py) | 0 | ||||
-rw-r--r-- | deluge/plugins/Extractor/deluge_extractor/webui.py (renamed from deluge/plugins/Extractor/deluge/plugins/extractor/webui.py) | 0 | ||||
-rw-r--r-- | deluge/plugins/Extractor/setup.py | 9 | ||||
-rw-r--r-- | deluge/plugins/Label/deluge/__init__.py | 1 | ||||
-rw-r--r-- | deluge/plugins/Label/deluge/plugins/__init__.py | 1 | ||||
-rw-r--r-- | deluge/plugins/Label/deluge_label/__init__.py (renamed from deluge/plugins/Label/deluge/plugins/label/__init__.py) | 0 | ||||
-rw-r--r-- | deluge/plugins/Label/deluge_label/common.py (renamed from deluge/plugins/Stats/deluge/plugins/stats/common.py) | 2 | ||||
-rw-r--r-- | deluge/plugins/Label/deluge_label/core.py (renamed from deluge/plugins/Label/deluge/plugins/label/core.py) | 0 | ||||
-rw-r--r-- | deluge/plugins/Label/deluge_label/data/label.js (renamed from deluge/plugins/Label/deluge/plugins/label/data/label.js) | 0 | ||||
-rw-r--r-- | deluge/plugins/Label/deluge_label/data/label_add.ui (renamed from deluge/plugins/Label/deluge/plugins/label/data/label_add.ui) | 0 | ||||
-rw-r--r-- | deluge/plugins/Label/deluge_label/data/label_options.ui (renamed from deluge/plugins/Label/deluge/plugins/label/data/label_options.ui) | 0 | ||||
-rw-r--r-- | deluge/plugins/Label/deluge_label/data/label_pref.ui (renamed from deluge/plugins/Label/deluge/plugins/label/data/label_pref.ui) | 0 | ||||
-rw-r--r-- | deluge/plugins/Label/deluge_label/gtkui/__init__.py (renamed from deluge/plugins/Label/deluge/plugins/label/gtkui/__init__.py) | 0 | ||||
-rw-r--r-- | deluge/plugins/Label/deluge_label/gtkui/label_config.py (renamed from deluge/plugins/Label/deluge/plugins/label/gtkui/label_config.py) | 0 | ||||
-rw-r--r-- | deluge/plugins/Label/deluge_label/gtkui/sidebar_menu.py (renamed from deluge/plugins/Label/deluge/plugins/label/gtkui/sidebar_menu.py) | 0 | ||||
-rw-r--r-- | deluge/plugins/Label/deluge_label/gtkui/submenu.py (renamed from deluge/plugins/Label/deluge/plugins/label/gtkui/submenu.py) | 0 | ||||
-rw-r--r-- | deluge/plugins/Label/deluge_label/test.py (renamed from deluge/plugins/Label/deluge/plugins/label/test.py) | 0 | ||||
-rw-r--r-- | deluge/plugins/Label/deluge_label/webui.py (renamed from deluge/plugins/Label/deluge/plugins/label/webui.py) | 0 | ||||
-rw-r--r-- | deluge/plugins/Label/setup.py | 9 | ||||
-rw-r--r-- | deluge/plugins/Notifications/deluge/__init__.py | 1 | ||||
-rw-r--r-- | deluge/plugins/Notifications/deluge/plugins/__init__.py | 1 | ||||
-rw-r--r-- | deluge/plugins/Notifications/deluge_notifications/__init__.py (renamed from deluge/plugins/Notifications/deluge/plugins/notifications/__init__.py) | 0 | ||||
-rw-r--r-- | deluge/plugins/Notifications/deluge_notifications/common.py (renamed from deluge/plugins/Notifications/deluge/plugins/notifications/common.py) | 4 | ||||
-rw-r--r-- | deluge/plugins/Notifications/deluge_notifications/core.py (renamed from deluge/plugins/Notifications/deluge/plugins/notifications/core.py) | 0 | ||||
-rw-r--r-- | deluge/plugins/Notifications/deluge_notifications/data/config.ui (renamed from deluge/plugins/Notifications/deluge/plugins/notifications/data/config.ui) | 0 | ||||
-rw-r--r-- | deluge/plugins/Notifications/deluge_notifications/data/notifications.js (renamed from deluge/plugins/Notifications/deluge/plugins/notifications/data/notifications.js) | 0 | ||||
-rw-r--r-- | deluge/plugins/Notifications/deluge_notifications/gtkui.py (renamed from deluge/plugins/Notifications/deluge/plugins/notifications/gtkui.py) | 0 | ||||
-rw-r--r-- | deluge/plugins/Notifications/deluge_notifications/test.py (renamed from deluge/plugins/Notifications/deluge/plugins/notifications/test.py) | 0 | ||||
-rw-r--r-- | deluge/plugins/Notifications/deluge_notifications/webui.py (renamed from deluge/plugins/Notifications/deluge/plugins/notifications/webui.py) | 0 | ||||
-rwxr-xr-x | deluge/plugins/Notifications/setup.py | 11 | ||||
-rw-r--r-- | deluge/plugins/Scheduler/deluge/__init__.py | 1 | ||||
-rw-r--r-- | deluge/plugins/Scheduler/deluge/plugins/__init__.py | 1 | ||||
-rw-r--r-- | deluge/plugins/Scheduler/deluge/plugins/scheduler/common.py | 23 | ||||
-rw-r--r-- | deluge/plugins/Scheduler/deluge_scheduler/__init__.py (renamed from deluge/plugins/Scheduler/deluge/plugins/scheduler/__init__.py) | 0 | ||||
-rw-r--r-- | deluge/plugins/Scheduler/deluge_scheduler/common.py (renamed from deluge/plugins/Toggle/deluge/plugins/toggle/common.py) | 2 | ||||
-rw-r--r-- | deluge/plugins/Scheduler/deluge_scheduler/core.py (renamed from deluge/plugins/Scheduler/deluge/plugins/scheduler/core.py) | 0 | ||||
-rw-r--r-- | deluge/plugins/Scheduler/deluge_scheduler/data/green.svg (renamed from deluge/plugins/Scheduler/deluge/plugins/scheduler/data/green.svg) | 0 | ||||
-rw-r--r-- | deluge/plugins/Scheduler/deluge_scheduler/data/red.svg (renamed from deluge/plugins/Scheduler/deluge/plugins/scheduler/data/red.svg) | 0 | ||||
-rw-r--r-- | deluge/plugins/Scheduler/deluge_scheduler/data/scheduler.js (renamed from deluge/plugins/Scheduler/deluge/plugins/scheduler/data/scheduler.js) | 0 | ||||
-rw-r--r-- | deluge/plugins/Scheduler/deluge_scheduler/data/yellow.svg (renamed from deluge/plugins/Scheduler/deluge/plugins/scheduler/data/yellow.svg) | 0 | ||||
-rw-r--r-- | deluge/plugins/Scheduler/deluge_scheduler/gtkui.py (renamed from deluge/plugins/Scheduler/deluge/plugins/scheduler/gtkui.py) | 0 | ||||
-rw-r--r-- | deluge/plugins/Scheduler/deluge_scheduler/webui.py (renamed from deluge/plugins/Scheduler/deluge/plugins/scheduler/webui.py) | 0 | ||||
-rw-r--r-- | deluge/plugins/Scheduler/setup.py | 9 | ||||
-rw-r--r-- | deluge/plugins/Stats/deluge/__init__.py | 1 | ||||
-rw-r--r-- | deluge/plugins/Stats/deluge/plugins/__init__.py | 1 | ||||
-rw-r--r-- | deluge/plugins/Stats/deluge_stats/__init__.py (renamed from deluge/plugins/Stats/deluge/plugins/stats/__init__.py) | 0 | ||||
-rw-r--r-- | deluge/plugins/Stats/deluge_stats/common.py | 23 | ||||
-rw-r--r-- | deluge/plugins/Stats/deluge_stats/core.py (renamed from deluge/plugins/Stats/deluge/plugins/stats/core.py) | 0 | ||||
-rw-r--r-- | deluge/plugins/Stats/deluge_stats/data/config.ui (renamed from deluge/plugins/Stats/deluge/plugins/stats/data/config.ui) | 0 | ||||
-rw-r--r-- | deluge/plugins/Stats/deluge_stats/data/stats.js (renamed from deluge/plugins/Stats/deluge/plugins/stats/data/stats.js) | 0 | ||||
-rw-r--r-- | deluge/plugins/Stats/deluge_stats/data/tabs.ui (renamed from deluge/plugins/Stats/deluge/plugins/stats/data/tabs.ui) | 0 | ||||
-rw-r--r-- | deluge/plugins/Stats/deluge_stats/graph.py (renamed from deluge/plugins/Stats/deluge/plugins/stats/graph.py) | 0 | ||||
-rw-r--r-- | deluge/plugins/Stats/deluge_stats/gtkui.py (renamed from deluge/plugins/Stats/deluge/plugins/stats/gtkui.py) | 0 | ||||
-rw-r--r-- | deluge/plugins/Stats/deluge_stats/template/graph.html (renamed from deluge/plugins/Stats/deluge/plugins/stats/template/graph.html) | 0 | ||||
-rw-r--r-- | deluge/plugins/Stats/deluge_stats/tests/__init__.py (renamed from deluge/plugins/Stats/deluge/plugins/stats/tests/__init__.py) | 0 | ||||
-rw-r--r-- | deluge/plugins/Stats/deluge_stats/tests/test.html (renamed from deluge/plugins/Stats/deluge/plugins/stats/tests/test.html) | 0 | ||||
-rw-r--r-- | deluge/plugins/Stats/deluge_stats/tests/test_stats.py (renamed from deluge/plugins/Stats/deluge/plugins/stats/tests/test_stats.py) | 2 | ||||
-rw-r--r-- | deluge/plugins/Stats/deluge_stats/webui.py (renamed from deluge/plugins/Stats/deluge/plugins/stats/webui.py) | 0 | ||||
-rw-r--r-- | deluge/plugins/Stats/setup.py | 9 | ||||
-rw-r--r-- | deluge/plugins/Toggle/deluge/__init__.py | 1 | ||||
-rw-r--r-- | deluge/plugins/Toggle/deluge/plugins/__init__.py | 1 | ||||
-rw-r--r-- | deluge/plugins/Toggle/deluge_toggle/__init__.py (renamed from deluge/plugins/Toggle/deluge/plugins/toggle/__init__.py) | 0 | ||||
-rw-r--r-- | deluge/plugins/Toggle/deluge_toggle/common.py | 23 | ||||
-rw-r--r-- | deluge/plugins/Toggle/deluge_toggle/core.py (renamed from deluge/plugins/Toggle/deluge/plugins/toggle/core.py) | 0 | ||||
-rw-r--r-- | deluge/plugins/Toggle/deluge_toggle/data/toggle.js (renamed from deluge/plugins/Toggle/deluge/plugins/toggle/data/toggle.js) | 0 | ||||
-rw-r--r-- | deluge/plugins/Toggle/deluge_toggle/gtkui.py (renamed from deluge/plugins/Toggle/deluge/plugins/toggle/gtkui.py) | 0 | ||||
-rw-r--r-- | deluge/plugins/Toggle/deluge_toggle/webui.py (renamed from deluge/plugins/Toggle/deluge/plugins/toggle/webui.py) | 0 | ||||
-rw-r--r-- | deluge/plugins/Toggle/setup.py | 9 | ||||
-rw-r--r-- | deluge/plugins/WebUi/deluge/__init__.py | 1 | ||||
-rw-r--r-- | deluge/plugins/WebUi/deluge/plugins/__init__.py | 1 | ||||
-rw-r--r-- | deluge/plugins/WebUi/deluge_webui/__init__.py (renamed from deluge/plugins/WebUi/deluge/plugins/webui/__init__.py) | 0 | ||||
-rw-r--r-- | deluge/plugins/WebUi/deluge_webui/common.py | 23 | ||||
-rw-r--r-- | deluge/plugins/WebUi/deluge_webui/core.py (renamed from deluge/plugins/WebUi/deluge/plugins/webui/core.py) | 0 | ||||
-rw-r--r-- | deluge/plugins/WebUi/deluge_webui/data/config.ui (renamed from deluge/plugins/WebUi/deluge/plugins/webui/data/config.ui) | 0 | ||||
-rw-r--r-- | deluge/plugins/WebUi/deluge_webui/gtkui.py (renamed from deluge/plugins/WebUi/deluge/plugins/webui/gtkui.py) | 0 | ||||
-rw-r--r-- | deluge/plugins/WebUi/deluge_webui/tests/__init__.py (renamed from deluge/plugins/WebUi/deluge/plugins/webui/tests/__init__.py) | 0 | ||||
-rw-r--r-- | deluge/plugins/WebUi/deluge_webui/tests/test_plugin_webui.py (renamed from deluge/plugins/WebUi/deluge/plugins/webui/tests/test_plugin_webui.py) | 0 | ||||
-rw-r--r-- | deluge/plugins/WebUi/setup.py | 7 | ||||
-rw-r--r-- | deluge/plugins/__init__.py | 1 | ||||
-rw-r--r-- | deluge/scripts/create_plugin.py | 23 | ||||
-rwxr-xr-x | setup.py | 1 |
132 files changed, 123 insertions, 171 deletions
diff --git a/deluge/__init__.py b/deluge/__init__.py index 3a58602bd..1836ded86 100644 --- a/deluge/__init__.py +++ b/deluge/__init__.py @@ -1,2 +1 @@ """Deluge""" -__import__('pkg_resources').declare_namespace(__name__) diff --git a/deluge/plugins/AutoAdd/deluge/__init__.py b/deluge/plugins/AutoAdd/deluge/__init__.py deleted file mode 100644 index de40ea7ca..000000000 --- a/deluge/plugins/AutoAdd/deluge/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__import__('pkg_resources').declare_namespace(__name__) diff --git a/deluge/plugins/AutoAdd/deluge/plugins/__init__.py b/deluge/plugins/AutoAdd/deluge/plugins/__init__.py deleted file mode 100644 index de40ea7ca..000000000 --- a/deluge/plugins/AutoAdd/deluge/plugins/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__import__('pkg_resources').declare_namespace(__name__) diff --git a/deluge/plugins/AutoAdd/deluge/plugins/autoadd/__init__.py b/deluge/plugins/AutoAdd/deluge_autoadd/__init__.py index a409cfcce..a409cfcce 100644 --- a/deluge/plugins/AutoAdd/deluge/plugins/autoadd/__init__.py +++ b/deluge/plugins/AutoAdd/deluge_autoadd/__init__.py diff --git a/deluge/plugins/AutoAdd/deluge/plugins/autoadd/common.py b/deluge/plugins/AutoAdd/deluge_autoadd/common.py index 16b41e643..9b4b1e703 100644 --- a/deluge/plugins/AutoAdd/deluge/plugins/autoadd/common.py +++ b/deluge/plugins/AutoAdd/deluge_autoadd/common.py @@ -21,4 +21,4 @@ from pkg_resources import resource_filename def get_resource(filename, subdir=False): folder = os.path.join('data', 'autoadd_options') if subdir else 'data' - return resource_filename('deluge.plugins.autoadd', os.path.join(folder, filename)) + return resource_filename(__package__, os.path.join(folder, filename)) diff --git a/deluge/plugins/AutoAdd/deluge/plugins/autoadd/core.py b/deluge/plugins/AutoAdd/deluge_autoadd/core.py index 79e5327b8..79e5327b8 100644 --- a/deluge/plugins/AutoAdd/deluge/plugins/autoadd/core.py +++ b/deluge/plugins/AutoAdd/deluge_autoadd/core.py diff --git a/deluge/plugins/AutoAdd/deluge/plugins/autoadd/data/autoadd.js b/deluge/plugins/AutoAdd/deluge_autoadd/data/autoadd.js index 40086b3fa..40086b3fa 100644 --- a/deluge/plugins/AutoAdd/deluge/plugins/autoadd/data/autoadd.js +++ b/deluge/plugins/AutoAdd/deluge_autoadd/data/autoadd.js diff --git a/deluge/plugins/AutoAdd/deluge/plugins/autoadd/data/autoadd_options.js b/deluge/plugins/AutoAdd/deluge_autoadd/data/autoadd_options.js index 49f752fbf..49f752fbf 100644 --- a/deluge/plugins/AutoAdd/deluge/plugins/autoadd/data/autoadd_options.js +++ b/deluge/plugins/AutoAdd/deluge_autoadd/data/autoadd_options.js diff --git a/deluge/plugins/AutoAdd/deluge/plugins/autoadd/data/autoadd_options.ui b/deluge/plugins/AutoAdd/deluge_autoadd/data/autoadd_options.ui index a4cd364e9..a4cd364e9 100644 --- a/deluge/plugins/AutoAdd/deluge/plugins/autoadd/data/autoadd_options.ui +++ b/deluge/plugins/AutoAdd/deluge_autoadd/data/autoadd_options.ui diff --git a/deluge/plugins/AutoAdd/deluge/plugins/autoadd/data/autoadd_options/main_tab.js b/deluge/plugins/AutoAdd/deluge_autoadd/data/autoadd_options/main_tab.js index 79d2600de..79d2600de 100644 --- a/deluge/plugins/AutoAdd/deluge/plugins/autoadd/data/autoadd_options/main_tab.js +++ b/deluge/plugins/AutoAdd/deluge_autoadd/data/autoadd_options/main_tab.js diff --git a/deluge/plugins/AutoAdd/deluge/plugins/autoadd/data/autoadd_options/options_tab.js b/deluge/plugins/AutoAdd/deluge_autoadd/data/autoadd_options/options_tab.js index a69490c25..a69490c25 100644 --- a/deluge/plugins/AutoAdd/deluge/plugins/autoadd/data/autoadd_options/options_tab.js +++ b/deluge/plugins/AutoAdd/deluge_autoadd/data/autoadd_options/options_tab.js diff --git a/deluge/plugins/AutoAdd/deluge/plugins/autoadd/data/config.ui b/deluge/plugins/AutoAdd/deluge_autoadd/data/config.ui index 0e645d374..0e645d374 100644 --- a/deluge/plugins/AutoAdd/deluge/plugins/autoadd/data/config.ui +++ b/deluge/plugins/AutoAdd/deluge_autoadd/data/config.ui diff --git a/deluge/plugins/AutoAdd/deluge/plugins/autoadd/gtkui.py b/deluge/plugins/AutoAdd/deluge_autoadd/gtkui.py index 16f0f7a30..16f0f7a30 100644 --- a/deluge/plugins/AutoAdd/deluge/plugins/autoadd/gtkui.py +++ b/deluge/plugins/AutoAdd/deluge_autoadd/gtkui.py diff --git a/deluge/plugins/AutoAdd/deluge/plugins/autoadd/webui.py b/deluge/plugins/AutoAdd/deluge_autoadd/webui.py index 7f36ba659..7f36ba659 100644 --- a/deluge/plugins/AutoAdd/deluge/plugins/autoadd/webui.py +++ b/deluge/plugins/AutoAdd/deluge_autoadd/webui.py diff --git a/deluge/plugins/AutoAdd/setup.py b/deluge/plugins/AutoAdd/setup.py index 2fe68efb6..fcd018395 100644 --- a/deluge/plugins/AutoAdd/setup.py +++ b/deluge/plugins/AutoAdd/setup.py @@ -23,9 +23,7 @@ __url__ = 'http://dev.deluge-torrent.org/wiki/Plugins/AutoAdd' __license__ = 'GPLv3' __description__ = 'Monitors folders for .torrent files.' __long_description__ = """""" -__pkg_data__ = { - 'deluge.plugins.' + __plugin_name__.lower(): ['template/*', 'data/*', 'data/*/*'] -} +__pkg_data__ = {'deluge_' + __plugin_name__.lower(): ['data/*', 'data/*/*']} setup( name=__plugin_name__, @@ -37,15 +35,14 @@ setup( license=__license__, long_description=__long_description__ if __long_description__ else __description__, packages=find_packages(), - namespace_packages=['deluge', 'deluge.plugins'], package_data=__pkg_data__, entry_points=""" [deluge.plugin.core] - %s = deluge.plugins.%s:CorePlugin + %s = deluge_%s:CorePlugin [deluge.plugin.gtk3ui] - %s = deluge.plugins.%s:Gtk3UIPlugin + %s = deluge_%s:Gtk3UIPlugin [deluge.plugin.web] - %s = deluge.plugins.%s:WebUIPlugin + %s = deluge_%s:WebUIPlugin """ % ((__plugin_name__, __plugin_name__.lower()) * 3), ) diff --git a/deluge/plugins/Blocklist/deluge/__init__.py b/deluge/plugins/Blocklist/deluge/__init__.py deleted file mode 100644 index de40ea7ca..000000000 --- a/deluge/plugins/Blocklist/deluge/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__import__('pkg_resources').declare_namespace(__name__) diff --git a/deluge/plugins/Blocklist/deluge/plugins/__init__.py b/deluge/plugins/Blocklist/deluge/plugins/__init__.py deleted file mode 100644 index de40ea7ca..000000000 --- a/deluge/plugins/Blocklist/deluge/plugins/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__import__('pkg_resources').declare_namespace(__name__) diff --git a/deluge/plugins/Blocklist/deluge/plugins/blocklist/__init__.py b/deluge/plugins/Blocklist/deluge_blocklist/__init__.py index 96ccc02ae..96ccc02ae 100644 --- a/deluge/plugins/Blocklist/deluge/plugins/blocklist/__init__.py +++ b/deluge/plugins/Blocklist/deluge_blocklist/__init__.py diff --git a/deluge/plugins/Blocklist/deluge/plugins/blocklist/common.py b/deluge/plugins/Blocklist/deluge_blocklist/common.py index d42d90d2f..a9299cd2e 100644 --- a/deluge/plugins/Blocklist/deluge/plugins/blocklist/common.py +++ b/deluge/plugins/Blocklist/deluge_blocklist/common.py @@ -23,7 +23,7 @@ from pkg_resources import resource_filename def get_resource(filename): - return resource_filename('deluge.plugins.blocklist', os.path.join('data', filename)) + return resource_filename(__package__, os.path.join('data', filename)) def raises_errors_as(error): diff --git a/deluge/plugins/Blocklist/deluge/plugins/blocklist/core.py b/deluge/plugins/Blocklist/deluge_blocklist/core.py index a096b8ac9..a096b8ac9 100644 --- a/deluge/plugins/Blocklist/deluge/plugins/blocklist/core.py +++ b/deluge/plugins/Blocklist/deluge_blocklist/core.py diff --git a/deluge/plugins/Blocklist/deluge/plugins/blocklist/data/blocklist.js b/deluge/plugins/Blocklist/deluge_blocklist/data/blocklist.js index 8e4769c5f..8e4769c5f 100644 --- a/deluge/plugins/Blocklist/deluge/plugins/blocklist/data/blocklist.js +++ b/deluge/plugins/Blocklist/deluge_blocklist/data/blocklist.js diff --git a/deluge/plugins/Blocklist/deluge/plugins/blocklist/data/blocklist16.png b/deluge/plugins/Blocklist/deluge_blocklist/data/blocklist16.png Binary files differindex 15b42997f..15b42997f 100644 --- a/deluge/plugins/Blocklist/deluge/plugins/blocklist/data/blocklist16.png +++ b/deluge/plugins/Blocklist/deluge_blocklist/data/blocklist16.png diff --git a/deluge/plugins/Blocklist/deluge/plugins/blocklist/data/blocklist_download24.png b/deluge/plugins/Blocklist/deluge_blocklist/data/blocklist_download24.png Binary files differindex 6de3a0d23..6de3a0d23 100644 --- a/deluge/plugins/Blocklist/deluge/plugins/blocklist/data/blocklist_download24.png +++ b/deluge/plugins/Blocklist/deluge_blocklist/data/blocklist_download24.png diff --git a/deluge/plugins/Blocklist/deluge/plugins/blocklist/data/blocklist_import24.png b/deluge/plugins/Blocklist/deluge_blocklist/data/blocklist_import24.png Binary files differindex 9441214cb..9441214cb 100644 --- a/deluge/plugins/Blocklist/deluge/plugins/blocklist/data/blocklist_import24.png +++ b/deluge/plugins/Blocklist/deluge_blocklist/data/blocklist_import24.png diff --git a/deluge/plugins/Blocklist/deluge/plugins/blocklist/data/blocklist_pref.ui b/deluge/plugins/Blocklist/deluge_blocklist/data/blocklist_pref.ui index 013d8e70e..013d8e70e 100644 --- a/deluge/plugins/Blocklist/deluge/plugins/blocklist/data/blocklist_pref.ui +++ b/deluge/plugins/Blocklist/deluge_blocklist/data/blocklist_pref.ui diff --git a/deluge/plugins/Blocklist/deluge/plugins/blocklist/decompressers.py b/deluge/plugins/Blocklist/deluge_blocklist/decompressers.py index 35211b706..35211b706 100644 --- a/deluge/plugins/Blocklist/deluge/plugins/blocklist/decompressers.py +++ b/deluge/plugins/Blocklist/deluge_blocklist/decompressers.py diff --git a/deluge/plugins/Blocklist/deluge/plugins/blocklist/detect.py b/deluge/plugins/Blocklist/deluge_blocklist/detect.py index 262d5de4f..262d5de4f 100644 --- a/deluge/plugins/Blocklist/deluge/plugins/blocklist/detect.py +++ b/deluge/plugins/Blocklist/deluge_blocklist/detect.py diff --git a/deluge/plugins/Blocklist/deluge/plugins/blocklist/gtkui.py b/deluge/plugins/Blocklist/deluge_blocklist/gtkui.py index b6e5d5508..b6e5d5508 100644 --- a/deluge/plugins/Blocklist/deluge/plugins/blocklist/gtkui.py +++ b/deluge/plugins/Blocklist/deluge_blocklist/gtkui.py diff --git a/deluge/plugins/Blocklist/deluge/plugins/blocklist/peerguardian.py b/deluge/plugins/Blocklist/deluge_blocklist/peerguardian.py index ba410c2cf..ba410c2cf 100644 --- a/deluge/plugins/Blocklist/deluge/plugins/blocklist/peerguardian.py +++ b/deluge/plugins/Blocklist/deluge_blocklist/peerguardian.py diff --git a/deluge/plugins/Blocklist/deluge/plugins/blocklist/readers.py b/deluge/plugins/Blocklist/deluge_blocklist/readers.py index 4079e849e..4079e849e 100644 --- a/deluge/plugins/Blocklist/deluge/plugins/blocklist/readers.py +++ b/deluge/plugins/Blocklist/deluge_blocklist/readers.py diff --git a/deluge/plugins/Blocklist/deluge/plugins/blocklist/webui.py b/deluge/plugins/Blocklist/deluge_blocklist/webui.py index 3da43c451..3da43c451 100644 --- a/deluge/plugins/Blocklist/deluge/plugins/blocklist/webui.py +++ b/deluge/plugins/Blocklist/deluge_blocklist/webui.py diff --git a/deluge/plugins/Blocklist/setup.py b/deluge/plugins/Blocklist/setup.py index 1d21847d8..54ad002a3 100644 --- a/deluge/plugins/Blocklist/setup.py +++ b/deluge/plugins/Blocklist/setup.py @@ -17,7 +17,7 @@ __url__ = 'http://deluge-torrent.org' __license__ = 'GPLv3' __description__ = 'Download and import IP blocklists' __long_description__ = __description__ -__pkg_data__ = {'deluge.plugins.' + __plugin_name__.lower(): ['data/*']} +__pkg_data__ = {'deluge_' + __plugin_name__.lower(): ['data/*']} setup( name=__plugin_name__, @@ -30,15 +30,14 @@ setup( zip_safe=False, long_description=__long_description__, packages=find_packages(), - namespace_packages=['deluge', 'deluge.plugins'], package_data=__pkg_data__, entry_points=""" [deluge.plugin.core] - %s = deluge.plugins.%s:CorePlugin + %s = deluge_%s:CorePlugin [deluge.plugin.gtk3ui] - %s = deluge.plugins.%s:GtkUIPlugin + %s = deluge_%s:GtkUIPlugin [deluge.plugin.web] - %s = deluge.plugins.%s:WebUIPlugin + %s = deluge_%s:WebUIPlugin """ % ((__plugin_name__, __plugin_name__.lower()) * 3), ) diff --git a/deluge/plugins/Execute/deluge/__init__.py b/deluge/plugins/Execute/deluge/__init__.py deleted file mode 100644 index de40ea7ca..000000000 --- a/deluge/plugins/Execute/deluge/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__import__('pkg_resources').declare_namespace(__name__) diff --git a/deluge/plugins/Execute/deluge/plugins/__init__.py b/deluge/plugins/Execute/deluge/plugins/__init__.py deleted file mode 100644 index de40ea7ca..000000000 --- a/deluge/plugins/Execute/deluge/plugins/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__import__('pkg_resources').declare_namespace(__name__) diff --git a/deluge/plugins/Execute/deluge/plugins/execute/common.py b/deluge/plugins/Execute/deluge/plugins/execute/common.py deleted file mode 100644 index de0479129..000000000 --- a/deluge/plugins/Execute/deluge/plugins/execute/common.py +++ /dev/null @@ -1,23 +0,0 @@ -# -*- coding: utf-8 -*- -# -# Basic plugin template created by: -# Copyright (C) 2008 Martijn Voncken <mvoncken@gmail.com> -# 2007-2009 Andrew Resch <andrewresch@gmail.com> -# 2009 Damien Churchill <damoxc@gmail.com> -# 2010 Pedro Algarvio <pedro@algarvio.me> -# 2017 Calum Lind <calumlind+deluge@gmail.com> -# -# This file is part of Deluge and is licensed under GNU General Public License 3.0, or later, with -# the additional special exception to link portions of this program with the OpenSSL library. -# See LICENSE for more details. -# - -from __future__ import unicode_literals - -import os.path - -from pkg_resources import resource_filename - - -def get_resource(filename): - return resource_filename('deluge.plugins.execute', os.path.join('data', filename)) diff --git a/deluge/plugins/Execute/deluge/plugins/execute/__init__.py b/deluge/plugins/Execute/deluge_execute/__init__.py index c6d55f4ec..c6d55f4ec 100644 --- a/deluge/plugins/Execute/deluge/plugins/execute/__init__.py +++ b/deluge/plugins/Execute/deluge_execute/__init__.py diff --git a/deluge/plugins/Label/deluge/plugins/label/common.py b/deluge/plugins/Execute/deluge_execute/common.py index 16e7d8aa3..4c9db09d5 100644 --- a/deluge/plugins/Label/deluge/plugins/label/common.py +++ b/deluge/plugins/Execute/deluge_execute/common.py @@ -20,4 +20,4 @@ from pkg_resources import resource_filename def get_resource(filename): - return resource_filename('deluge.plugins.label', os.path.join('data', filename)) + return resource_filename(__package__, os.path.join('data', filename)) diff --git a/deluge/plugins/Execute/deluge/plugins/execute/core.py b/deluge/plugins/Execute/deluge_execute/core.py index 9dcd97aaa..9dcd97aaa 100644 --- a/deluge/plugins/Execute/deluge/plugins/execute/core.py +++ b/deluge/plugins/Execute/deluge_execute/core.py diff --git a/deluge/plugins/Execute/deluge/plugins/execute/data/execute.js b/deluge/plugins/Execute/deluge_execute/data/execute.js index bd6ac9860..bd6ac9860 100644 --- a/deluge/plugins/Execute/deluge/plugins/execute/data/execute.js +++ b/deluge/plugins/Execute/deluge_execute/data/execute.js diff --git a/deluge/plugins/Execute/deluge/plugins/execute/data/execute_prefs.ui b/deluge/plugins/Execute/deluge_execute/data/execute_prefs.ui index e2a5cd507..e2a5cd507 100644 --- a/deluge/plugins/Execute/deluge/plugins/execute/data/execute_prefs.ui +++ b/deluge/plugins/Execute/deluge_execute/data/execute_prefs.ui diff --git a/deluge/plugins/Execute/deluge/plugins/execute/gtkui.py b/deluge/plugins/Execute/deluge_execute/gtkui.py index c0c720089..c0c720089 100644 --- a/deluge/plugins/Execute/deluge/plugins/execute/gtkui.py +++ b/deluge/plugins/Execute/deluge_execute/gtkui.py diff --git a/deluge/plugins/Execute/deluge/plugins/execute/webui.py b/deluge/plugins/Execute/deluge_execute/webui.py index 8327001b8..8327001b8 100644 --- a/deluge/plugins/Execute/deluge/plugins/execute/webui.py +++ b/deluge/plugins/Execute/deluge_execute/webui.py diff --git a/deluge/plugins/Execute/setup.py b/deluge/plugins/Execute/setup.py index d2156a8df..174d1a356 100644 --- a/deluge/plugins/Execute/setup.py +++ b/deluge/plugins/Execute/setup.py @@ -17,7 +17,7 @@ __url__ = 'http://deluge-torrent.org' __license__ = 'GPLv3' __description__ = 'Plugin to execute a command upon an event' __long_description__ = __description__ -__pkg_data__ = {'deluge.plugins.' + __plugin_name__.lower(): ['data/*']} +__pkg_data__ = {'deluge_' + __plugin_name__.lower(): ['data/*']} setup( name=__plugin_name__, @@ -29,15 +29,14 @@ setup( license=__license__, long_description=__long_description__, packages=find_packages(), - namespace_packages=['deluge', 'deluge.plugins'], package_data=__pkg_data__, entry_points=""" [deluge.plugin.core] - %s = deluge.plugins.%s:CorePlugin + %s = deluge_%s:CorePlugin [deluge.plugin.gtk3ui] - %s = deluge.plugins.%s:GtkUIPlugin + %s = deluge_%s:GtkUIPlugin [deluge.plugin.web] - %s = deluge.plugins.%s:WebUIPlugin + %s = deluge_%s:WebUIPlugin """ % ((__plugin_name__, __plugin_name__.lower()) * 3), ) diff --git a/deluge/plugins/Extractor/deluge/__init__.py b/deluge/plugins/Extractor/deluge/__init__.py deleted file mode 100644 index de40ea7ca..000000000 --- a/deluge/plugins/Extractor/deluge/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__import__('pkg_resources').declare_namespace(__name__) diff --git a/deluge/plugins/Extractor/deluge/plugins/__init__.py b/deluge/plugins/Extractor/deluge/plugins/__init__.py deleted file mode 100644 index de40ea7ca..000000000 --- a/deluge/plugins/Extractor/deluge/plugins/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__import__('pkg_resources').declare_namespace(__name__) diff --git a/deluge/plugins/Extractor/deluge/plugins/extractor/common.py b/deluge/plugins/Extractor/deluge/plugins/extractor/common.py deleted file mode 100644 index 5d6ab1511..000000000 --- a/deluge/plugins/Extractor/deluge/plugins/extractor/common.py +++ /dev/null @@ -1,23 +0,0 @@ -# -*- coding: utf-8 -*- -# -# Basic plugin template created by: -# Copyright (C) 2008 Martijn Voncken <mvoncken@gmail.com> -# 2007-2009 Andrew Resch <andrewresch@gmail.com> -# 2009 Damien Churchill <damoxc@gmail.com> -# 2010 Pedro Algarvio <pedro@algarvio.me> -# 2017 Calum Lind <calumlind+deluge@gmail.com> -# -# This file is part of Deluge and is licensed under GNU General Public License 3.0, or later, with -# the additional special exception to link portions of this program with the OpenSSL library. -# See LICENSE for more details. -# - -from __future__ import unicode_literals - -import os.path - -from pkg_resources import resource_filename - - -def get_resource(filename): - return resource_filename('deluge.plugins.extractor', os.path.join('data', filename)) diff --git a/deluge/plugins/Extractor/deluge/plugins/extractor/__init__.py b/deluge/plugins/Extractor/deluge_extractor/__init__.py index 6db72b63b..6db72b63b 100644 --- a/deluge/plugins/Extractor/deluge/plugins/extractor/__init__.py +++ b/deluge/plugins/Extractor/deluge_extractor/__init__.py diff --git a/deluge/plugins/WebUi/deluge/plugins/webui/common.py b/deluge/plugins/Extractor/deluge_extractor/common.py index 0a9d6574f..4c9db09d5 100644 --- a/deluge/plugins/WebUi/deluge/plugins/webui/common.py +++ b/deluge/plugins/Extractor/deluge_extractor/common.py @@ -20,4 +20,4 @@ from pkg_resources import resource_filename def get_resource(filename): - return resource_filename('deluge.plugins.webui', os.path.join('data', filename)) + return resource_filename(__package__, os.path.join('data', filename)) diff --git a/deluge/plugins/Extractor/deluge/plugins/extractor/core.py b/deluge/plugins/Extractor/deluge_extractor/core.py index 99d1b083a..99d1b083a 100644 --- a/deluge/plugins/Extractor/deluge/plugins/extractor/core.py +++ b/deluge/plugins/Extractor/deluge_extractor/core.py diff --git a/deluge/plugins/Extractor/deluge/plugins/extractor/data/extractor.js b/deluge/plugins/Extractor/deluge_extractor/data/extractor.js index b11cb30f6..b11cb30f6 100644 --- a/deluge/plugins/Extractor/deluge/plugins/extractor/data/extractor.js +++ b/deluge/plugins/Extractor/deluge_extractor/data/extractor.js diff --git a/deluge/plugins/Extractor/deluge/plugins/extractor/data/extractor_prefs.ui b/deluge/plugins/Extractor/deluge_extractor/data/extractor_prefs.ui index 6f34b4411..6f34b4411 100644 --- a/deluge/plugins/Extractor/deluge/plugins/extractor/data/extractor_prefs.ui +++ b/deluge/plugins/Extractor/deluge_extractor/data/extractor_prefs.ui diff --git a/deluge/plugins/Extractor/deluge/plugins/extractor/gtkui.py b/deluge/plugins/Extractor/deluge_extractor/gtkui.py index 113b33f6d..113b33f6d 100644 --- a/deluge/plugins/Extractor/deluge/plugins/extractor/gtkui.py +++ b/deluge/plugins/Extractor/deluge_extractor/gtkui.py diff --git a/deluge/plugins/Extractor/deluge/plugins/extractor/webui.py b/deluge/plugins/Extractor/deluge_extractor/webui.py index feb7b4a83..feb7b4a83 100644 --- a/deluge/plugins/Extractor/deluge/plugins/extractor/webui.py +++ b/deluge/plugins/Extractor/deluge_extractor/webui.py diff --git a/deluge/plugins/Extractor/setup.py b/deluge/plugins/Extractor/setup.py index dded10238..25ab153b3 100644 --- a/deluge/plugins/Extractor/setup.py +++ b/deluge/plugins/Extractor/setup.py @@ -30,7 +30,7 @@ Windows support: .rar, .zip, .tar, .7z, .xz, .lzma Note: Will not extract with 'Move Completed' enabled """ -__pkg_data__ = {'deluge.plugins.' + __plugin_name__.lower(): ['template/*', 'data/*']} +__pkg_data__ = {'deluge_' + __plugin_name__.lower(): ['data/*']} setup( name=__plugin_name__, @@ -42,15 +42,14 @@ setup( license=__license__, long_description=__long_description__ if __long_description__ else __description__, packages=find_packages(), - namespace_packages=['deluge', 'deluge.plugins'], package_data=__pkg_data__, entry_points=""" [deluge.plugin.core] - %s = deluge.plugins.%s:CorePlugin + %s = deluge_%s:CorePlugin [deluge.plugin.gtk3ui] - %s = deluge.plugins.%s:GtkUIPlugin + %s = deluge_%s:GtkUIPlugin [deluge.plugin.web] - %s = deluge.plugins.%s:WebUIPlugin + %s = deluge_%s:WebUIPlugin """ % ((__plugin_name__, __plugin_name__.lower()) * 3), ) diff --git a/deluge/plugins/Label/deluge/__init__.py b/deluge/plugins/Label/deluge/__init__.py deleted file mode 100644 index de40ea7ca..000000000 --- a/deluge/plugins/Label/deluge/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__import__('pkg_resources').declare_namespace(__name__) diff --git a/deluge/plugins/Label/deluge/plugins/__init__.py b/deluge/plugins/Label/deluge/plugins/__init__.py deleted file mode 100644 index de40ea7ca..000000000 --- a/deluge/plugins/Label/deluge/plugins/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__import__('pkg_resources').declare_namespace(__name__) diff --git a/deluge/plugins/Label/deluge/plugins/label/__init__.py b/deluge/plugins/Label/deluge_label/__init__.py index bc0b0f243..bc0b0f243 100644 --- a/deluge/plugins/Label/deluge/plugins/label/__init__.py +++ b/deluge/plugins/Label/deluge_label/__init__.py diff --git a/deluge/plugins/Stats/deluge/plugins/stats/common.py b/deluge/plugins/Label/deluge_label/common.py index f70d711d6..4c9db09d5 100644 --- a/deluge/plugins/Stats/deluge/plugins/stats/common.py +++ b/deluge/plugins/Label/deluge_label/common.py @@ -20,4 +20,4 @@ from pkg_resources import resource_filename def get_resource(filename): - return resource_filename('deluge.plugins.stats', os.path.join('data', filename)) + return resource_filename(__package__, os.path.join('data', filename)) diff --git a/deluge/plugins/Label/deluge/plugins/label/core.py b/deluge/plugins/Label/deluge_label/core.py index b16156c91..b16156c91 100644 --- a/deluge/plugins/Label/deluge/plugins/label/core.py +++ b/deluge/plugins/Label/deluge_label/core.py diff --git a/deluge/plugins/Label/deluge/plugins/label/data/label.js b/deluge/plugins/Label/deluge_label/data/label.js index cb0c1fe15..cb0c1fe15 100644 --- a/deluge/plugins/Label/deluge/plugins/label/data/label.js +++ b/deluge/plugins/Label/deluge_label/data/label.js diff --git a/deluge/plugins/Label/deluge/plugins/label/data/label_add.ui b/deluge/plugins/Label/deluge_label/data/label_add.ui index 68f8a72b2..68f8a72b2 100644 --- a/deluge/plugins/Label/deluge/plugins/label/data/label_add.ui +++ b/deluge/plugins/Label/deluge_label/data/label_add.ui diff --git a/deluge/plugins/Label/deluge/plugins/label/data/label_options.ui b/deluge/plugins/Label/deluge_label/data/label_options.ui index c0fca4ff5..c0fca4ff5 100644 --- a/deluge/plugins/Label/deluge/plugins/label/data/label_options.ui +++ b/deluge/plugins/Label/deluge_label/data/label_options.ui diff --git a/deluge/plugins/Label/deluge/plugins/label/data/label_pref.ui b/deluge/plugins/Label/deluge_label/data/label_pref.ui index 81edc378a..81edc378a 100644 --- a/deluge/plugins/Label/deluge/plugins/label/data/label_pref.ui +++ b/deluge/plugins/Label/deluge_label/data/label_pref.ui diff --git a/deluge/plugins/Label/deluge/plugins/label/gtkui/__init__.py b/deluge/plugins/Label/deluge_label/gtkui/__init__.py index eeaeadcc8..eeaeadcc8 100644 --- a/deluge/plugins/Label/deluge/plugins/label/gtkui/__init__.py +++ b/deluge/plugins/Label/deluge_label/gtkui/__init__.py diff --git a/deluge/plugins/Label/deluge/plugins/label/gtkui/label_config.py b/deluge/plugins/Label/deluge_label/gtkui/label_config.py index b1bf56de6..b1bf56de6 100644 --- a/deluge/plugins/Label/deluge/plugins/label/gtkui/label_config.py +++ b/deluge/plugins/Label/deluge_label/gtkui/label_config.py diff --git a/deluge/plugins/Label/deluge/plugins/label/gtkui/sidebar_menu.py b/deluge/plugins/Label/deluge_label/gtkui/sidebar_menu.py index 34358db6e..34358db6e 100644 --- a/deluge/plugins/Label/deluge/plugins/label/gtkui/sidebar_menu.py +++ b/deluge/plugins/Label/deluge_label/gtkui/sidebar_menu.py diff --git a/deluge/plugins/Label/deluge/plugins/label/gtkui/submenu.py b/deluge/plugins/Label/deluge_label/gtkui/submenu.py index c5f80e70c..c5f80e70c 100644 --- a/deluge/plugins/Label/deluge/plugins/label/gtkui/submenu.py +++ b/deluge/plugins/Label/deluge_label/gtkui/submenu.py diff --git a/deluge/plugins/Label/deluge/plugins/label/test.py b/deluge/plugins/Label/deluge_label/test.py index 5c9ffcd00..5c9ffcd00 100644 --- a/deluge/plugins/Label/deluge/plugins/label/test.py +++ b/deluge/plugins/Label/deluge_label/test.py diff --git a/deluge/plugins/Label/deluge/plugins/label/webui.py b/deluge/plugins/Label/deluge_label/webui.py index 58c38e941..58c38e941 100644 --- a/deluge/plugins/Label/deluge/plugins/label/webui.py +++ b/deluge/plugins/Label/deluge_label/webui.py diff --git a/deluge/plugins/Label/setup.py b/deluge/plugins/Label/setup.py index a6907563b..567335be2 100644 --- a/deluge/plugins/Label/setup.py +++ b/deluge/plugins/Label/setup.py @@ -21,7 +21,7 @@ Allows labels to be assigned to torrents Also offers filters on state, tracker and keywords """ -__pkg_data__ = {'deluge.plugins.' + __plugin_name__.lower(): ['template/*', 'data/*']} +__pkg_data__ = {'deluge_' + __plugin_name__.lower(): ['data/*']} setup( name=__plugin_name__, @@ -33,15 +33,14 @@ setup( license=__license__, long_description=__long_description__, packages=find_packages(), - namespace_packages=['deluge', 'deluge.plugins'], package_data=__pkg_data__, entry_points=""" [deluge.plugin.core] - %s = deluge.plugins.%s:CorePlugin + %s = deluge_%s:CorePlugin [deluge.plugin.gtk3ui] - %s = deluge.plugins.%s:GtkUIPlugin + %s = deluge_%s:GtkUIPlugin [deluge.plugin.web] - %s = deluge.plugins.%s:WebUIPlugin + %s = deluge_%s:WebUIPlugin """ % ((__plugin_name__, __plugin_name__.lower()) * 3), ) diff --git a/deluge/plugins/Notifications/deluge/__init__.py b/deluge/plugins/Notifications/deluge/__init__.py deleted file mode 100644 index de40ea7ca..000000000 --- a/deluge/plugins/Notifications/deluge/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__import__('pkg_resources').declare_namespace(__name__) diff --git a/deluge/plugins/Notifications/deluge/plugins/__init__.py b/deluge/plugins/Notifications/deluge/plugins/__init__.py deleted file mode 100644 index de40ea7ca..000000000 --- a/deluge/plugins/Notifications/deluge/plugins/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__import__('pkg_resources').declare_namespace(__name__) diff --git a/deluge/plugins/Notifications/deluge/plugins/notifications/__init__.py b/deluge/plugins/Notifications/deluge_notifications/__init__.py index 810e284df..810e284df 100644 --- a/deluge/plugins/Notifications/deluge/plugins/notifications/__init__.py +++ b/deluge/plugins/Notifications/deluge_notifications/__init__.py diff --git a/deluge/plugins/Notifications/deluge/plugins/notifications/common.py b/deluge/plugins/Notifications/deluge_notifications/common.py index 8284d9700..6966122ca 100644 --- a/deluge/plugins/Notifications/deluge/plugins/notifications/common.py +++ b/deluge/plugins/Notifications/deluge_notifications/common.py @@ -27,9 +27,7 @@ log = logging.getLogger(__name__) def get_resource(filename): - return resource_filename( - 'deluge.plugins.notifications', os.path.join('data', filename) - ) + return resource_filename(__package__, os.path.join('data', filename)) class CustomNotifications(object): diff --git a/deluge/plugins/Notifications/deluge/plugins/notifications/core.py b/deluge/plugins/Notifications/deluge_notifications/core.py index 123f9cf05..123f9cf05 100644 --- a/deluge/plugins/Notifications/deluge/plugins/notifications/core.py +++ b/deluge/plugins/Notifications/deluge_notifications/core.py diff --git a/deluge/plugins/Notifications/deluge/plugins/notifications/data/config.ui b/deluge/plugins/Notifications/deluge_notifications/data/config.ui index c16b37acd..c16b37acd 100644 --- a/deluge/plugins/Notifications/deluge/plugins/notifications/data/config.ui +++ b/deluge/plugins/Notifications/deluge_notifications/data/config.ui diff --git a/deluge/plugins/Notifications/deluge/plugins/notifications/data/notifications.js b/deluge/plugins/Notifications/deluge_notifications/data/notifications.js index c9fb71fba..c9fb71fba 100644 --- a/deluge/plugins/Notifications/deluge/plugins/notifications/data/notifications.js +++ b/deluge/plugins/Notifications/deluge_notifications/data/notifications.js diff --git a/deluge/plugins/Notifications/deluge/plugins/notifications/gtkui.py b/deluge/plugins/Notifications/deluge_notifications/gtkui.py index 816cb36e5..816cb36e5 100644 --- a/deluge/plugins/Notifications/deluge/plugins/notifications/gtkui.py +++ b/deluge/plugins/Notifications/deluge_notifications/gtkui.py diff --git a/deluge/plugins/Notifications/deluge/plugins/notifications/test.py b/deluge/plugins/Notifications/deluge_notifications/test.py index 2e6f9755b..2e6f9755b 100644 --- a/deluge/plugins/Notifications/deluge/plugins/notifications/test.py +++ b/deluge/plugins/Notifications/deluge_notifications/test.py diff --git a/deluge/plugins/Notifications/deluge/plugins/notifications/webui.py b/deluge/plugins/Notifications/deluge_notifications/webui.py index d3529c4f9..d3529c4f9 100644 --- a/deluge/plugins/Notifications/deluge/plugins/notifications/webui.py +++ b/deluge/plugins/Notifications/deluge_notifications/webui.py diff --git a/deluge/plugins/Notifications/setup.py b/deluge/plugins/Notifications/setup.py index c96999c98..d9a9e4227 100755 --- a/deluge/plugins/Notifications/setup.py +++ b/deluge/plugins/Notifications/setup.py @@ -29,7 +29,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__ = {'deluge.plugins.' + __plugin_name__.lower(): ['template/*', 'data/*']} +__pkg_data__ = {'deluge_' + __plugin_name__.lower(): ['data/*']} setup( name=__plugin_name__, @@ -40,16 +40,15 @@ setup( url=__url__, license=__license__, long_description=__long_description__ if __long_description__ else __description__, - packages=find_packages(exclude=['**/test.py']), - namespace_packages=['deluge', 'deluge.plugins'], + packages=find_packages(), package_data=__pkg_data__, entry_points=""" [deluge.plugin.core] - %s = deluge.plugins.%s:CorePlugin + %s = deluge_%s:CorePlugin [deluge.plugin.gtk3ui] - %s = deluge.plugins.%s:GtkUIPlugin + %s = deluge_%s:GtkUIPlugin [deluge.plugin.web] - %s = deluge.plugins.%s:WebUIPlugin + %s = deluge_%s:WebUIPlugin """ % ((__plugin_name__, __plugin_name__.lower()) * 3), ) diff --git a/deluge/plugins/Scheduler/deluge/__init__.py b/deluge/plugins/Scheduler/deluge/__init__.py deleted file mode 100644 index de40ea7ca..000000000 --- a/deluge/plugins/Scheduler/deluge/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__import__('pkg_resources').declare_namespace(__name__) diff --git a/deluge/plugins/Scheduler/deluge/plugins/__init__.py b/deluge/plugins/Scheduler/deluge/plugins/__init__.py deleted file mode 100644 index de40ea7ca..000000000 --- a/deluge/plugins/Scheduler/deluge/plugins/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__import__('pkg_resources').declare_namespace(__name__) diff --git a/deluge/plugins/Scheduler/deluge/plugins/scheduler/common.py b/deluge/plugins/Scheduler/deluge/plugins/scheduler/common.py deleted file mode 100644 index 27cd79af7..000000000 --- a/deluge/plugins/Scheduler/deluge/plugins/scheduler/common.py +++ /dev/null @@ -1,23 +0,0 @@ -# -*- coding: utf-8 -*- -# -# Basic plugin template created by: -# Copyright (C) 2008 Martijn Voncken <mvoncken@gmail.com> -# 2007-2009 Andrew Resch <andrewresch@gmail.com> -# 2009 Damien Churchill <damoxc@gmail.com> -# 2010 Pedro Algarvio <pedro@algarvio.me> -# 2017 Calum Lind <calumlind+deluge@gmail.com> -# -# This file is part of Deluge and is licensed under GNU General Public License 3.0, or later, with -# the additional special exception to link portions of this program with the OpenSSL library. -# See LICENSE for more details. -# - -from __future__ import unicode_literals - -import os.path - -from pkg_resources import resource_filename - - -def get_resource(filename): - return resource_filename('deluge.plugins.scheduler', os.path.join('data', filename)) diff --git a/deluge/plugins/Scheduler/deluge/plugins/scheduler/__init__.py b/deluge/plugins/Scheduler/deluge_scheduler/__init__.py index 6db72b63b..6db72b63b 100644 --- a/deluge/plugins/Scheduler/deluge/plugins/scheduler/__init__.py +++ b/deluge/plugins/Scheduler/deluge_scheduler/__init__.py diff --git a/deluge/plugins/Toggle/deluge/plugins/toggle/common.py b/deluge/plugins/Scheduler/deluge_scheduler/common.py index 60f6ac149..4c9db09d5 100644 --- a/deluge/plugins/Toggle/deluge/plugins/toggle/common.py +++ b/deluge/plugins/Scheduler/deluge_scheduler/common.py @@ -20,4 +20,4 @@ from pkg_resources import resource_filename def get_resource(filename): - return resource_filename('deluge.plugins.toggle', os.path.join('data', filename)) + return resource_filename(__package__, os.path.join('data', filename)) diff --git a/deluge/plugins/Scheduler/deluge/plugins/scheduler/core.py b/deluge/plugins/Scheduler/deluge_scheduler/core.py index 388e4f0f6..388e4f0f6 100644 --- a/deluge/plugins/Scheduler/deluge/plugins/scheduler/core.py +++ b/deluge/plugins/Scheduler/deluge_scheduler/core.py diff --git a/deluge/plugins/Scheduler/deluge/plugins/scheduler/data/green.svg b/deluge/plugins/Scheduler/deluge_scheduler/data/green.svg index ff3f5d6f3..ff3f5d6f3 100644 --- a/deluge/plugins/Scheduler/deluge/plugins/scheduler/data/green.svg +++ b/deluge/plugins/Scheduler/deluge_scheduler/data/green.svg diff --git a/deluge/plugins/Scheduler/deluge/plugins/scheduler/data/red.svg b/deluge/plugins/Scheduler/deluge_scheduler/data/red.svg index ccb082221..ccb082221 100644 --- a/deluge/plugins/Scheduler/deluge/plugins/scheduler/data/red.svg +++ b/deluge/plugins/Scheduler/deluge_scheduler/data/red.svg diff --git a/deluge/plugins/Scheduler/deluge/plugins/scheduler/data/scheduler.js b/deluge/plugins/Scheduler/deluge_scheduler/data/scheduler.js index 13bec4605..13bec4605 100644 --- a/deluge/plugins/Scheduler/deluge/plugins/scheduler/data/scheduler.js +++ b/deluge/plugins/Scheduler/deluge_scheduler/data/scheduler.js diff --git a/deluge/plugins/Scheduler/deluge/plugins/scheduler/data/yellow.svg b/deluge/plugins/Scheduler/deluge_scheduler/data/yellow.svg index 8881a8ca6..8881a8ca6 100644 --- a/deluge/plugins/Scheduler/deluge/plugins/scheduler/data/yellow.svg +++ b/deluge/plugins/Scheduler/deluge_scheduler/data/yellow.svg diff --git a/deluge/plugins/Scheduler/deluge/plugins/scheduler/gtkui.py b/deluge/plugins/Scheduler/deluge_scheduler/gtkui.py index 12f5fb63c..12f5fb63c 100644 --- a/deluge/plugins/Scheduler/deluge/plugins/scheduler/gtkui.py +++ b/deluge/plugins/Scheduler/deluge_scheduler/gtkui.py diff --git a/deluge/plugins/Scheduler/deluge/plugins/scheduler/webui.py b/deluge/plugins/Scheduler/deluge_scheduler/webui.py index 518eaa6aa..518eaa6aa 100644 --- a/deluge/plugins/Scheduler/deluge/plugins/scheduler/webui.py +++ b/deluge/plugins/Scheduler/deluge_scheduler/webui.py diff --git a/deluge/plugins/Scheduler/setup.py b/deluge/plugins/Scheduler/setup.py index 4d62051fe..71b69e9f9 100644 --- a/deluge/plugins/Scheduler/setup.py +++ b/deluge/plugins/Scheduler/setup.py @@ -21,7 +21,7 @@ __url__ = 'http://deluge-torrent.org' __license__ = 'GPLv3' __description__ = 'Schedule limits on a per-hour per-day basis.' __long_description__ = """""" -__pkg_data__ = {'deluge.plugins.' + __plugin_name__.lower(): ['template/*', 'data/*']} +__pkg_data__ = {'deluge_' + __plugin_name__.lower(): ['data/*']} setup( name=__plugin_name__, @@ -33,15 +33,14 @@ setup( license=__license__, long_description=__long_description__ if __long_description__ else __description__, packages=find_packages(), - namespace_packages=['deluge', 'deluge.plugins'], package_data=__pkg_data__, entry_points=""" [deluge.plugin.core] - %s = deluge.plugins.%s:CorePlugin + %s = deluge_%s:CorePlugin [deluge.plugin.gtk3ui] - %s = deluge.plugins.%s:GtkUIPlugin + %s = deluge_%s:GtkUIPlugin [deluge.plugin.web] - %s = deluge.plugins.%s:WebUIPlugin + %s = deluge_%s:WebUIPlugin """ % ((__plugin_name__, __plugin_name__.lower()) * 3), ) diff --git a/deluge/plugins/Stats/deluge/__init__.py b/deluge/plugins/Stats/deluge/__init__.py deleted file mode 100644 index de40ea7ca..000000000 --- a/deluge/plugins/Stats/deluge/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__import__('pkg_resources').declare_namespace(__name__) diff --git a/deluge/plugins/Stats/deluge/plugins/__init__.py b/deluge/plugins/Stats/deluge/plugins/__init__.py deleted file mode 100644 index de40ea7ca..000000000 --- a/deluge/plugins/Stats/deluge/plugins/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__import__('pkg_resources').declare_namespace(__name__) diff --git a/deluge/plugins/Stats/deluge/plugins/stats/__init__.py b/deluge/plugins/Stats/deluge_stats/__init__.py index a40379b9a..a40379b9a 100644 --- a/deluge/plugins/Stats/deluge/plugins/stats/__init__.py +++ b/deluge/plugins/Stats/deluge_stats/__init__.py diff --git a/deluge/plugins/Stats/deluge_stats/common.py b/deluge/plugins/Stats/deluge_stats/common.py new file mode 100644 index 000000000..4c9db09d5 --- /dev/null +++ b/deluge/plugins/Stats/deluge_stats/common.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +# +# Basic plugin template created by: +# Copyright (C) 2008 Martijn Voncken <mvoncken@gmail.com> +# 2007-2009 Andrew Resch <andrewresch@gmail.com> +# 2009 Damien Churchill <damoxc@gmail.com> +# 2010 Pedro Algarvio <pedro@algarvio.me> +# 2017 Calum Lind <calumlind+deluge@gmail.com> +# +# This file is part of Deluge and is licensed under GNU General Public License 3.0, or later, with +# the additional special exception to link portions of this program with the OpenSSL library. +# See LICENSE for more details. +# + +from __future__ import unicode_literals + +import os.path + +from pkg_resources import resource_filename + + +def get_resource(filename): + return resource_filename(__package__, os.path.join('data', filename)) diff --git a/deluge/plugins/Stats/deluge/plugins/stats/core.py b/deluge/plugins/Stats/deluge_stats/core.py index 635c54db6..635c54db6 100644 --- a/deluge/plugins/Stats/deluge/plugins/stats/core.py +++ b/deluge/plugins/Stats/deluge_stats/core.py diff --git a/deluge/plugins/Stats/deluge/plugins/stats/data/config.ui b/deluge/plugins/Stats/deluge_stats/data/config.ui index 326598b5b..326598b5b 100644 --- a/deluge/plugins/Stats/deluge/plugins/stats/data/config.ui +++ b/deluge/plugins/Stats/deluge_stats/data/config.ui diff --git a/deluge/plugins/Stats/deluge/plugins/stats/data/stats.js b/deluge/plugins/Stats/deluge_stats/data/stats.js index 8f9e3f841..8f9e3f841 100644 --- a/deluge/plugins/Stats/deluge/plugins/stats/data/stats.js +++ b/deluge/plugins/Stats/deluge_stats/data/stats.js diff --git a/deluge/plugins/Stats/deluge/plugins/stats/data/tabs.ui b/deluge/plugins/Stats/deluge_stats/data/tabs.ui index 4b35765a9..4b35765a9 100644 --- a/deluge/plugins/Stats/deluge/plugins/stats/data/tabs.ui +++ b/deluge/plugins/Stats/deluge_stats/data/tabs.ui diff --git a/deluge/plugins/Stats/deluge/plugins/stats/graph.py b/deluge/plugins/Stats/deluge_stats/graph.py index 847c253d1..847c253d1 100644 --- a/deluge/plugins/Stats/deluge/plugins/stats/graph.py +++ b/deluge/plugins/Stats/deluge_stats/graph.py diff --git a/deluge/plugins/Stats/deluge/plugins/stats/gtkui.py b/deluge/plugins/Stats/deluge_stats/gtkui.py index 75e30150e..75e30150e 100644 --- a/deluge/plugins/Stats/deluge/plugins/stats/gtkui.py +++ b/deluge/plugins/Stats/deluge_stats/gtkui.py diff --git a/deluge/plugins/Stats/deluge/plugins/stats/template/graph.html b/deluge/plugins/Stats/deluge_stats/template/graph.html index 2ff803bcb..2ff803bcb 100644 --- a/deluge/plugins/Stats/deluge/plugins/stats/template/graph.html +++ b/deluge/plugins/Stats/deluge_stats/template/graph.html diff --git a/deluge/plugins/Stats/deluge/plugins/stats/tests/__init__.py b/deluge/plugins/Stats/deluge_stats/tests/__init__.py index e69de29bb..e69de29bb 100644 --- a/deluge/plugins/Stats/deluge/plugins/stats/tests/__init__.py +++ b/deluge/plugins/Stats/deluge_stats/tests/__init__.py diff --git a/deluge/plugins/Stats/deluge/plugins/stats/tests/test.html b/deluge/plugins/Stats/deluge_stats/tests/test.html index 7af5f1502..7af5f1502 100644 --- a/deluge/plugins/Stats/deluge/plugins/stats/tests/test.html +++ b/deluge/plugins/Stats/deluge_stats/tests/test.html diff --git a/deluge/plugins/Stats/deluge/plugins/stats/tests/test_stats.py b/deluge/plugins/Stats/deluge_stats/tests/test_stats.py index 60dd7768f..3b581be3e 100644 --- a/deluge/plugins/Stats/deluge/plugins/stats/tests/test_stats.py +++ b/deluge/plugins/Stats/deluge_stats/tests/test_stats.py @@ -79,7 +79,7 @@ class StatsTestCase(BaseTestCase): from deluge.ui.gtkui.pluginmanager import PluginManager from deluge.ui.gtkui.torrentdetails import TorrentDetails from deluge.ui.gtkui.torrentview import TorrentView - from deluge.plugins.Stats.deluge.plugins.stats import graph, gtkui + from deluge_stats import graph, gtkui ConfigManager('gtkui.conf', defaults=DEFAULT_PREFS) diff --git a/deluge/plugins/Stats/deluge/plugins/stats/webui.py b/deluge/plugins/Stats/deluge_stats/webui.py index 4c11260e5..4c11260e5 100644 --- a/deluge/plugins/Stats/deluge/plugins/stats/webui.py +++ b/deluge/plugins/Stats/deluge_stats/webui.py diff --git a/deluge/plugins/Stats/setup.py b/deluge/plugins/Stats/setup.py index 65d36941e..174c652a9 100644 --- a/deluge/plugins/Stats/setup.py +++ b/deluge/plugins/Stats/setup.py @@ -25,7 +25,7 @@ __long_description__ = """ Records lots of extra stats and produces time series graphs""" -__pkg_data__ = {'deluge.plugins.' + __plugin_name__.lower(): ['template/*', 'data/*']} +__pkg_data__ = {'deluge_' + __plugin_name__.lower(): ['template/*', 'data/*']} setup( name=__plugin_name__, @@ -37,15 +37,14 @@ setup( license=__license__, long_description=__long_description__, packages=find_packages(), - namespace_packages=['deluge', 'deluge.plugins'], package_data=__pkg_data__, entry_points=""" [deluge.plugin.core] - %s = deluge.plugins.%s:CorePlugin + %s = deluge_%s:CorePlugin [deluge.plugin.gtk3ui] - %s = deluge.plugins.%s:GtkUIPlugin + %s = deluge_%s:GtkUIPlugin [deluge.plugin.web] - %s = deluge.plugins.%s:WebUIPlugin + %s = deluge_%s:WebUIPlugin """ % ((__plugin_name__, __plugin_name__.lower()) * 3), ) diff --git a/deluge/plugins/Toggle/deluge/__init__.py b/deluge/plugins/Toggle/deluge/__init__.py deleted file mode 100644 index de40ea7ca..000000000 --- a/deluge/plugins/Toggle/deluge/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__import__('pkg_resources').declare_namespace(__name__) diff --git a/deluge/plugins/Toggle/deluge/plugins/__init__.py b/deluge/plugins/Toggle/deluge/plugins/__init__.py deleted file mode 100644 index de40ea7ca..000000000 --- a/deluge/plugins/Toggle/deluge/plugins/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__import__('pkg_resources').declare_namespace(__name__) diff --git a/deluge/plugins/Toggle/deluge/plugins/toggle/__init__.py b/deluge/plugins/Toggle/deluge_toggle/__init__.py index e63e4aa4c..e63e4aa4c 100644 --- a/deluge/plugins/Toggle/deluge/plugins/toggle/__init__.py +++ b/deluge/plugins/Toggle/deluge_toggle/__init__.py diff --git a/deluge/plugins/Toggle/deluge_toggle/common.py b/deluge/plugins/Toggle/deluge_toggle/common.py new file mode 100644 index 000000000..4c9db09d5 --- /dev/null +++ b/deluge/plugins/Toggle/deluge_toggle/common.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +# +# Basic plugin template created by: +# Copyright (C) 2008 Martijn Voncken <mvoncken@gmail.com> +# 2007-2009 Andrew Resch <andrewresch@gmail.com> +# 2009 Damien Churchill <damoxc@gmail.com> +# 2010 Pedro Algarvio <pedro@algarvio.me> +# 2017 Calum Lind <calumlind+deluge@gmail.com> +# +# This file is part of Deluge and is licensed under GNU General Public License 3.0, or later, with +# the additional special exception to link portions of this program with the OpenSSL library. +# See LICENSE for more details. +# + +from __future__ import unicode_literals + +import os.path + +from pkg_resources import resource_filename + + +def get_resource(filename): + return resource_filename(__package__, os.path.join('data', filename)) diff --git a/deluge/plugins/Toggle/deluge/plugins/toggle/core.py b/deluge/plugins/Toggle/deluge_toggle/core.py index dad52ce61..dad52ce61 100644 --- a/deluge/plugins/Toggle/deluge/plugins/toggle/core.py +++ b/deluge/plugins/Toggle/deluge_toggle/core.py diff --git a/deluge/plugins/Toggle/deluge/plugins/toggle/data/toggle.js b/deluge/plugins/Toggle/deluge_toggle/data/toggle.js index 8e9a045ad..8e9a045ad 100644 --- a/deluge/plugins/Toggle/deluge/plugins/toggle/data/toggle.js +++ b/deluge/plugins/Toggle/deluge_toggle/data/toggle.js diff --git a/deluge/plugins/Toggle/deluge/plugins/toggle/gtkui.py b/deluge/plugins/Toggle/deluge_toggle/gtkui.py index c54bca46f..c54bca46f 100644 --- a/deluge/plugins/Toggle/deluge/plugins/toggle/gtkui.py +++ b/deluge/plugins/Toggle/deluge_toggle/gtkui.py diff --git a/deluge/plugins/Toggle/deluge/plugins/toggle/webui.py b/deluge/plugins/Toggle/deluge_toggle/webui.py index 8f0fc8c99..8f0fc8c99 100644 --- a/deluge/plugins/Toggle/deluge/plugins/toggle/webui.py +++ b/deluge/plugins/Toggle/deluge_toggle/webui.py diff --git a/deluge/plugins/Toggle/setup.py b/deluge/plugins/Toggle/setup.py index 54d9ee228..acc6e6c7d 100644 --- a/deluge/plugins/Toggle/setup.py +++ b/deluge/plugins/Toggle/setup.py @@ -22,7 +22,7 @@ __url__ = 'http://deluge-torrent.org' __license__ = 'GPLv3' __description__ = 'Toggles the session' __long_description__ = """""" -__pkg_data__ = {'deluge.plugins.' + __plugin_name__.lower(): ['template/*', 'data/*']} +__pkg_data__ = {'deluge_' + __plugin_name__.lower(): ['data/*']} setup( name=__plugin_name__, @@ -34,15 +34,14 @@ setup( license=__license__, long_description=__long_description__ if __long_description__ else __description__, packages=find_packages(), - namespace_packages=['deluge', 'deluge.plugins'], package_data=__pkg_data__, entry_points=""" [deluge.plugin.core] - %s = deluge.plugins.%s:CorePlugin + %s = deluge_%s:CorePlugin [deluge.plugin.gtk3ui] - %s = deluge.plugins.%s:GtkUIPlugin + %s = deluge_%s:GtkUIPlugin [deluge.plugin.web] - %s = deluge.plugins.%s:WebUIPlugin + %s = deluge_%s:WebUIPlugin """ % ((__plugin_name__, __plugin_name__.lower()) * 3), ) diff --git a/deluge/plugins/WebUi/deluge/__init__.py b/deluge/plugins/WebUi/deluge/__init__.py deleted file mode 100644 index de40ea7ca..000000000 --- a/deluge/plugins/WebUi/deluge/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__import__('pkg_resources').declare_namespace(__name__) diff --git a/deluge/plugins/WebUi/deluge/plugins/__init__.py b/deluge/plugins/WebUi/deluge/plugins/__init__.py deleted file mode 100644 index de40ea7ca..000000000 --- a/deluge/plugins/WebUi/deluge/plugins/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__import__('pkg_resources').declare_namespace(__name__) diff --git a/deluge/plugins/WebUi/deluge/plugins/webui/__init__.py b/deluge/plugins/WebUi/deluge_webui/__init__.py index a3d29805a..a3d29805a 100644 --- a/deluge/plugins/WebUi/deluge/plugins/webui/__init__.py +++ b/deluge/plugins/WebUi/deluge_webui/__init__.py diff --git a/deluge/plugins/WebUi/deluge_webui/common.py b/deluge/plugins/WebUi/deluge_webui/common.py new file mode 100644 index 000000000..4c9db09d5 --- /dev/null +++ b/deluge/plugins/WebUi/deluge_webui/common.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +# +# Basic plugin template created by: +# Copyright (C) 2008 Martijn Voncken <mvoncken@gmail.com> +# 2007-2009 Andrew Resch <andrewresch@gmail.com> +# 2009 Damien Churchill <damoxc@gmail.com> +# 2010 Pedro Algarvio <pedro@algarvio.me> +# 2017 Calum Lind <calumlind+deluge@gmail.com> +# +# This file is part of Deluge and is licensed under GNU General Public License 3.0, or later, with +# the additional special exception to link portions of this program with the OpenSSL library. +# See LICENSE for more details. +# + +from __future__ import unicode_literals + +import os.path + +from pkg_resources import resource_filename + + +def get_resource(filename): + return resource_filename(__package__, os.path.join('data', filename)) diff --git a/deluge/plugins/WebUi/deluge/plugins/webui/core.py b/deluge/plugins/WebUi/deluge_webui/core.py index cc3330fc0..cc3330fc0 100644 --- a/deluge/plugins/WebUi/deluge/plugins/webui/core.py +++ b/deluge/plugins/WebUi/deluge_webui/core.py diff --git a/deluge/plugins/WebUi/deluge/plugins/webui/data/config.ui b/deluge/plugins/WebUi/deluge_webui/data/config.ui index 18647a415..18647a415 100644 --- a/deluge/plugins/WebUi/deluge/plugins/webui/data/config.ui +++ b/deluge/plugins/WebUi/deluge_webui/data/config.ui diff --git a/deluge/plugins/WebUi/deluge/plugins/webui/gtkui.py b/deluge/plugins/WebUi/deluge_webui/gtkui.py index ca3a16ea4..ca3a16ea4 100644 --- a/deluge/plugins/WebUi/deluge/plugins/webui/gtkui.py +++ b/deluge/plugins/WebUi/deluge_webui/gtkui.py diff --git a/deluge/plugins/WebUi/deluge/plugins/webui/tests/__init__.py b/deluge/plugins/WebUi/deluge_webui/tests/__init__.py index e69de29bb..e69de29bb 100644 --- a/deluge/plugins/WebUi/deluge/plugins/webui/tests/__init__.py +++ b/deluge/plugins/WebUi/deluge_webui/tests/__init__.py diff --git a/deluge/plugins/WebUi/deluge/plugins/webui/tests/test_plugin_webui.py b/deluge/plugins/WebUi/deluge_webui/tests/test_plugin_webui.py index 56e1cc023..56e1cc023 100644 --- a/deluge/plugins/WebUi/deluge/plugins/webui/tests/test_plugin_webui.py +++ b/deluge/plugins/WebUi/deluge_webui/tests/test_plugin_webui.py diff --git a/deluge/plugins/WebUi/setup.py b/deluge/plugins/WebUi/setup.py index 3c110c8ed..861a05a50 100644 --- a/deluge/plugins/WebUi/setup.py +++ b/deluge/plugins/WebUi/setup.py @@ -21,7 +21,7 @@ __url__ = 'http://deluge-torrent.org' __license__ = 'GPLv3' __description__ = 'Allows starting the web interface within the daemon.' __long_description__ = """""" -__pkg_data__ = {'deluge.plugins.' + __plugin_name__.lower(): ['template/*', 'data/*']} +__pkg_data__ = {'deluge_' + __plugin_name__.lower(): ['data/*']} setup( name=__plugin_name__, @@ -33,13 +33,12 @@ setup( license=__license__, long_description=__long_description__ if __long_description__ else __description__, packages=find_packages(), - namespace_packages=['deluge', 'deluge.plugins'], package_data=__pkg_data__, entry_points=""" [deluge.plugin.core] - %s = deluge.plugins.%s:CorePlugin + %s = deluge_%s:CorePlugin [deluge.plugin.gtk3ui] - %s = deluge.plugins.%s:GtkUIPlugin + %s = deluge_%s:GtkUIPlugin """ % ((__plugin_name__, __plugin_name__.lower()) * 2), ) diff --git a/deluge/plugins/__init__.py b/deluge/plugins/__init__.py index de40ea7ca..e69de29bb 100644 --- a/deluge/plugins/__init__.py +++ b/deluge/plugins/__init__.py @@ -1 +0,0 @@ -__import__('pkg_resources').declare_namespace(__name__) diff --git a/deluge/scripts/create_plugin.py b/deluge/scripts/create_plugin.py index 6479d1f31..5e804efa8 100644 --- a/deluge/scripts/create_plugin.py +++ b/deluge/scripts/create_plugin.py @@ -70,9 +70,7 @@ def create_plugin(): if options.module_name: safe_name = options.module_name.lower() plugin_base = os.path.realpath(os.path.join(options.basepath, 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) + src = os.path.join(plugin_base, 'deluge_' + safe_name) data_dir = os.path.join(src, 'data') python_path = sys.executable @@ -102,15 +100,11 @@ def create_plugin(): 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, 'gtk3ui.py', GTK3UI) write_file(src, 'webui.py', WEBUI) @@ -201,7 +195,7 @@ __url__ = '%(url)s' __license__ = 'GPLv3' __description__ = '' __long_description__ = \"\"\"\"\"\" -__pkg_data__ = {'deluge.plugins.'+__plugin_name__.lower(): ['template/*', 'data/*']} +__pkg_data__ = {'deluge_'+__plugin_name__.lower(): ['data/*']} setup( name=__plugin_name__, @@ -214,16 +208,15 @@ setup( long_description=__long_description__, packages=find_packages(), - namespace_packages=['deluge', 'deluge.plugins'], package_data=__pkg_data__, entry_points=\"\"\" [deluge.plugin.core] - %%s = deluge.plugins.%%s:CorePlugin + %%s = deluge_%%s:CorePlugin [deluge.plugin.gtk3ui] - %%s = deluge.plugins.%%s:Gtk3UIPlugin + %%s = deluge_%%s:Gtk3UIPlugin [deluge.plugin.web] - %%s = deluge.plugins.%%s:WebUIPlugin + %%s = deluge_%%s:WebUIPlugin \"\"\" %% ((__plugin_name__, __plugin_name__.lower()) * 3) ) """ @@ -236,8 +229,7 @@ from pkg_resources import resource_filename def get_resource(filename): - return resource_filename( - 'deluge.plugins.%(safe_name)s', os.path.join('data', filename)) + return resource_filename(__package__, os.path.join('data', filename)) """ GTK3UI = """from __future__ import unicode_literals @@ -382,9 +374,6 @@ GPL = """# -*- coding: utf-8 -*- # the OpenSSL library. See LICENSE for more details. """ -NAMESPACE_INIT = """__import__('pkg_resources').declare_namespace(__name__) -""" - CREATE_DEV_LINK = """#!/bin/bash BASEDIR=$(cd `dirname $0` && pwd) CONFIG_DIR=$( test -z $1 && echo "%(configdir)s" || echo "$1") @@ -593,6 +593,5 @@ setup( package_data=_package_data, exclude_package_data=_exclude_package_data, packages=find_packages(exclude=['deluge.plugins.*', 'deluge.tests']), - namespace_packages=['deluge', 'deluge.plugins'], entry_points=_entry_points, ) |