Ported the FreeSpace plugin to the deluge.plugins namespace.

This commit is contained in:
Pedro Algarvio 2010-12-10 03:29:36 +00:00
parent e43146a4ac
commit c9e4d286c3
11 changed files with 14 additions and 6 deletions

View file

@ -0,0 +1,3 @@
# this is a namespace package
import pkg_resources
pkg_resources.declare_namespace(__name__)

View file

@ -0,0 +1,3 @@
# this is a namespace package
import pkg_resources
pkg_resources.declare_namespace(__name__)

View file

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

View file

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