Author: andar

Revision: 5359

Log:
        Add a lt-trunk branch

Diff:
Added: branches/lt-trunk/ez_setup.py
===================================================================
--- branches/lt-trunk/ez_setup.py                               (rev 0)
+++ branches/lt-trunk/ez_setup.py       2009-06-08 20:11:48 UTC (rev 5359)
@@ -0,0 +1,210 @@
+#!python
+"""Bootstrap setuptools installation
+
+If you want to use setuptools in your package's setup.py, just include this
+file in the same directory with it, and add this to the top of your setup.py::
+
+    from ez_setup import use_setuptools
+    use_setuptools()
+
+If you want to require a specific version of setuptools, set a download
+mirror, or use an alternate download directory, you can do so by supplying
+the appropriate options to ``use_setuptools()``.
+
+This file can also be run as a script to install or upgrade setuptools.
+"""
+import sys
+DEFAULT_VERSION = "0.6c8"
+DEFAULT_URL     = "http://cheeseshop.python.org/packages/%s/s/setuptools/"; % 
sys.version[:3]
+
+md5_data = {
+    'setuptools-0.6c8-py2.5.egg': '1721747ee329dc150590a58b3e1ac95b',
+    'setuptools-0.6c9-py2.5.egg': 'fe67c3e5a17b12c0e7c541b7ea43a8e6',
+    'setuptools-0.6c9-py2.6.egg': 'ca37b1ff16fa2ede6e19383e7b59245a',
+}
+
+import sys, os
+
+def _validate_md5(egg_name, data):
+    if egg_name in md5_data:
+        from md5 import md5
+        digest = md5(data).hexdigest()
+        if digest != md5_data[egg_name]:
+            print >>sys.stderr, (
+                "md5 validation of %s failed!  (Possible download problem?)"
+                % egg_name
+            )
+            sys.exit(2)
+    return data
+
+
+def use_setuptools(
+    version=DEFAULT_VERSION, download_base=DEFAULT_URL, to_dir=os.curdir,
+    download_delay=15
+):
+    """Automatically find/download setuptools and make it available on sys.path
+
+    `version` should be a valid setuptools version number that is available
+    as an egg for download under the `download_base` URL (which should end with
+    a '/').  `to_dir` is the directory where setuptools will be downloaded, if
+    it is not already available.  If `download_delay` is specified, it should
+    be the number of seconds that will be paused before initiating a download,
+    should one be required.  If an older version of setuptools is installed,
+    this routine will print a message to ``sys.stderr`` and raise SystemExit in
+    an attempt to abort the calling script.
+    """
+    try:
+        import setuptools
+        if setuptools.__version__ == '0.0.1':
+            print >>sys.stderr, (
+            "You have an obsolete version of setuptools installed.  Please\n"
+            "remove it from your system entirely before rerunning this script."
+            )
+            sys.exit(2)
+    except ImportError:
+        egg = download_setuptools(version, download_base, to_dir, 
download_delay)
+        sys.path.insert(0, egg)
+        import setuptools; setuptools.bootstrap_install_from = egg
+
+    import pkg_resources
+    try:
+        pkg_resources.require("setuptools>="+version)
+
+    except pkg_resources.VersionConflict, e:
+        # XXX could we install in a subprocess here?
+        print >>sys.stderr, (
+            "The required version of setuptools (>=%s) is not available, and\n"
+            "can't be installed while this script is running. Please install\n"
+            " a more recent version first.\n\n(Currently using %r)"
+        ) % (version, e.args[0])
+        sys.exit(2)
+
+def download_setuptools(
+    version=DEFAULT_VERSION, download_base=DEFAULT_URL, to_dir=os.curdir,
+    delay = 15
+):
+    """Download setuptools from a specified location and return its filename
+
+    `version` should be a valid setuptools version number that is available
+    as an egg for download under the `download_base` URL (which should end
+    with a '/'). `to_dir` is the directory where the egg will be downloaded.
+    `delay` is the number of seconds to pause before an actual download 
attempt.
+    """
+    import urllib2, shutil
+    egg_name = "setuptools-%s-py%s.egg" % (version,sys.version[:3])
+    url = download_base + egg_name
+    saveto = os.path.join(to_dir, egg_name)
+    src = dst = None
+    if not os.path.exists(saveto):  # Avoid repeated downloads
+        try:
+            from distutils import log
+            if delay:
+                log.warn("""
+---------------------------------------------------------------------------
+This script requires setuptools version %s to run (even to display
+help).  I will attempt to download it for you (from
+%s), but
+you may need to enable firewall access for this script first.
+I will start the download in %d seconds.
+
+(Note: if this machine does not have network access, please obtain the file
+
+   %s
+
+and place it in this directory before rerunning this script.)
+---------------------------------------------------------------------------""",
+                    version, download_base, delay, url
+                ); from time import sleep; sleep(delay)
+            log.warn("Downloading %s", url)
+            src = urllib2.urlopen(url)
+            # Read/write all in one block, so we don't create a corrupt file
+            # if the download is interrupted.
+            data = _validate_md5(egg_name, src.read())
+            dst = open(saveto,"wb"); dst.write(data)
+        finally:
+            if src: src.close()
+            if dst: dst.close()
+    return os.path.realpath(saveto)
+
+def main(argv, version=DEFAULT_VERSION):
+    """Install or upgrade setuptools and EasyInstall"""
+
+    try:
+        import setuptools
+    except ImportError:
+        egg = None
+        try:
+            egg = download_setuptools(version, delay=0)
+            sys.path.insert(0,egg)
+            from setuptools.command.easy_install import main
+            return main(list(argv)+[egg])   # we're done here
+        finally:
+            if egg and os.path.exists(egg):
+                os.unlink(egg)
+    else:
+        if setuptools.__version__ == '0.0.1':
+            # tell the user to uninstall obsolete version
+            use_setuptools(version)
+
+    req = "setuptools>="+version
+    import pkg_resources
+    try:
+        pkg_resources.require(req)
+    except pkg_resources.VersionConflict:
+        try:
+            from setuptools.command.easy_install import main
+        except ImportError:
+            from easy_install import main
+        main(list(argv)+[download_setuptools(delay=0)])
+        sys.exit(0) # try to force an exit
+    else:
+        if argv:
+            from setuptools.command.easy_install import main
+            main(argv)
+        else:
+            print "Setuptools version",version,"or greater has been installed."
+            print '(Run "ez_setup.py -U setuptools" to reinstall or upgrade.)'
+
+
+
+def update_md5(filenames):
+    """Update our built-in md5 registry"""
+
+    import re
+    from md5 import md5
+
+    for name in filenames:
+        base = os.path.basename(name)
+        f = open(name,'rb')
+        md5_data[base] = md5(f.read()).hexdigest()
+        f.close()
+
+    data = ["    %r: %r,\n" % it for it in md5_data.items()]
+    data.sort()
+    repl = "".join(data)
+
+    import inspect
+    srcfile = inspect.getsourcefile(sys.modules[__name__])
+    f = open(srcfile, 'rb'); src = f.read(); f.close()
+
+    match = re.search("\nmd5_data = {\n([^}]+)}", src)
+    if not match:
+        print >>sys.stderr, "Internal error!"
+        sys.exit(2)
+
+    src = src[:match.start(1)] + repl + src[match.end(1):]
+    f = open(srcfile,'w')
+    f.write(src)
+    f.close()
+
+
+if __name__=='__main__':
+    if len(sys.argv)>2 and sys.argv[1]=='--md5update':
+        update_md5(sys.argv[2:])
+    else:
+        main(sys.argv[1:])
+
+
+
+
+

Added: branches/lt-trunk/msgfmt.py
===================================================================
--- branches/lt-trunk/msgfmt.py                         (rev 0)
+++ branches/lt-trunk/msgfmt.py 2009-06-08 20:11:48 UTC (rev 5359)
@@ -0,0 +1,219 @@
+# -*- coding: iso-8859-1 -*-
+# Written by Martin v. Lwis <[email protected]>
+# Plural forms support added by alexander smishlajev <[email protected]>
+"""
+Generate binary message catalog from textual translation description.
+
+This program converts a textual Uniforum-style message catalog (.po file) into
+a binary GNU catalog (.mo file).  This is essentially the same function as the
+GNU msgfmt program, however, it is a simpler implementation.
+
+Usage: msgfmt.py [OPTIONS] filename.po
+
+Options:
+    -o file
+    --output-file=file
+        Specify the output file to write to.  If omitted, output will go to a
+        file named filename.mo (based off the input file name).
+
+    -h
+    --help
+        Print this message and exit.
+
+    -V
+    --version
+        Display version information and exit.
+"""
+
+import sys
+import os
+import getopt
+import struct
+import array
+
+__version__ = "1.1"
+
+MESSAGES = {}
+
+
+def usage (ecode, msg=''):
+    """
+    Print usage and msg and exit with given code.
+    """
+    print >> sys.stderr, __doc__
+    if msg:
+        print >> sys.stderr, msg
+    sys.exit(ecode)
+
+
+def add (msgid, transtr, fuzzy):
+    """
+    Add a non-fuzzy translation to the dictionary.
+    """
+    global MESSAGES
+    if not fuzzy and transtr and not transtr.startswith('\0'):
+        MESSAGES[msgid] = transtr
+
+
+def generate ():
+    """
+    Return the generated output.
+    """
+    global MESSAGES
+    keys = MESSAGES.keys()
+    # the keys are sorted in the .mo file
+    keys.sort()
+    offsets = []
+    ids = strs = ''
+    for _id in keys:
+        # For each string, we need size and file offset.  Each string is NUL
+        # terminated; the NUL does not count into the size.
+        offsets.append((len(ids), len(_id), len(strs), len(MESSAGES[_id])))
+        ids += _id + '\0'
+        strs += MESSAGES[_id] + '\0'
+    output = ''
+    # The header is 7 32-bit unsigned integers.  We don't use hash tables, so
+    # the keys start right after the index tables.
+    # translated string.
+    keystart = 7*4+16*len(keys)
+    # and the values start after the keys
+    valuestart = keystart + len(ids)
+    koffsets = []
+    voffsets = []
+    # The string table first has the list of keys, then the list of values.
+    # Each entry has first the size of the string, then the file offset.
+    for o1, l1, o2, l2 in offsets:
+        koffsets += [l1, o1+keystart]
+        voffsets += [l2, o2+valuestart]
+    offsets = koffsets + voffsets
+    output = struct.pack("Iiiiiii",
+                         0x950412deL,       # Magic
+                         0,                 # Version
+                         len(keys),         # # of entries
+                         7*4,               # start of key index
+                         7*4+len(keys)*8,   # start of value index
+                         0, 0)              # size and offset of hash table
+    output += array.array("i", offsets).tostring()
+    output += ids
+    output += strs
+    return output
+
+
+def make (filename, outfile):
+    ID = 1
+    STR = 2
+    global MESSAGES
+    MESSAGES = {}
+
+    # Compute .mo name from .po name and arguments
+    if filename.endswith('.po'):
+        infile = filename
+    else:
+        infile = filename + '.po'
+    if outfile is None:
+        outfile = os.path.splitext(infile)[0] + '.mo'
+
+    try:
+        lines = open(infile).readlines()
+    except IOError, msg:
+        print >> sys.stderr, msg
+        sys.exit(1)
+
+    section = None
+    fuzzy = 0
+
+    # Parse the catalog
+    msgid = msgstr = ''
+    lno = 0
+    for l in lines:
+        lno += 1
+        # If we get a comment line after a msgstr, this is a new entry
+        if l[0] == '#' and section == STR:
+            add(msgid, msgstr, fuzzy)
+            section = None
+            fuzzy = 0
+        # Record a fuzzy mark
+        if l[:2] == '#,' and (l.find('fuzzy') >= 0):
+            fuzzy = 1
+        # Skip comments
+        if l[0] == '#':
+            continue
+        # Start of msgid_plural section, separate from singular form with \0
+        if l.startswith('msgid_plural'):
+            msgid += '\0'
+            l = l[12:]
+        # Now we are in a msgid section, output previous section
+        elif l.startswith('msgid'):
+            if section == STR:
+                add(msgid, msgstr, fuzzy)
+            section = ID
+            l = l[5:]
+            msgid = msgstr = ''
+        # Now we are in a msgstr section
+        elif l.startswith('msgstr'):
+            section = STR
+            l = l[6:]
+            # Check for plural forms
+            if l.startswith('['):
+                # Separate plural forms with \0
+                if not l.startswith('[0]'):
+                    msgstr += '\0'
+                # Ignore the index - must come in sequence
+                l = l[l.index(']') + 1:]
+        # Skip empty lines
+        l = l.strip()
+        if not l:
+            continue
+        # XXX: Does this always follow Python escape semantics?
+        l = eval(l)
+        if section == ID:
+            msgid += l
+        elif section == STR:
+            msgstr += l
+        else:
+            print >> sys.stderr, 'Syntax error on %s:%d' % (infile, lno), \
+                  'before:'
+            print >> sys.stderr, l
+            sys.exit(1)
+    # Add last entry
+    if section == STR:
+        add(msgid, msgstr, fuzzy)
+
+    # Compute output
+    output = generate()
+
+    try:
+        open(outfile,"wb").write(output)
+    except IOError,msg:
+        print >> sys.stderr, msg
+
+
+def main ():
+    try:
+        opts, args = getopt.getopt(sys.argv[1:], 'hVo:',
+                                   ['help', 'version', 'output-file='])
+    except getopt.error, msg:
+        usage(1, msg)
+
+    outfile = None
+    # parse options
+    for opt, arg in opts:
+        if opt in ('-h', '--help'):
+            usage(0)
+        elif opt in ('-V', '--version'):
+            print >> sys.stderr, "msgfmt.py", __version__
+            sys.exit(0)
+        elif opt in ('-o', '--output-file'):
+            outfile = arg
+    # do it
+    if not args:
+        print >> sys.stderr, 'No input file given'
+        print >> sys.stderr, "Try `msgfmt --help' for more information."
+        return
+
+    for filename in args:
+        make(filename, outfile)
+
+
+if __name__ == '__main__':
+    main()

Added: branches/lt-trunk/setup.py
===================================================================
--- branches/lt-trunk/setup.py                          (rev 0)
+++ branches/lt-trunk/setup.py  2009-06-08 20:11:48 UTC (rev 5359)
@@ -0,0 +1,402 @@
+#
+# setup.py
+#
+# Copyright (C) 2007 Andrew Resch <[email protected]>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.    See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.    If not, write to:
+#      The Free Software Foundation, Inc.,
+#      51 Franklin Street, Fifth Floor
+#      Boston, MA    02110-1301, USA.
+#
+
+import ez_setup
+ez_setup.use_setuptools()
+import glob
+import sys
+
+from setuptools import setup, find_packages, Extension
+from distutils import cmd, sysconfig
+from distutils.command.build import build as _build
+from distutils.command.clean import clean as _clean
+from setuptools.command.install import install as _install
+
+import msgfmt
+import os
+import platform
+
+python_version = platform.python_version()[0:3]
+
+def windows_check():
+    return platform.system() in ('Windows', 'Microsoft')
+
+def osx_check():
+    return platform.system() == "Darwin"
+
+if not os.environ.has_key("CC"):
+    os.environ["CC"] = "gcc"
+
+if not os.environ.has_key("CXX"):
+    os.environ["CXX"] = "gcc"
+
+if not os.environ.has_key("CPP"):
+    os.environ["CPP"] = "g++"
+
+# The libtorrent extension
+_extra_compile_args = [
+    "-D_FILE_OFFSET_BITS=64",
+    "-DNDEBUG",
+    "-DTORRENT_USE_OPENSSL=1",
+    "-O2",
+    ]
+
+if windows_check():
+    _extra_compile_args += [
+        "-D__USE_W32_SOCKETS",
+        "-D_WIN32_WINNT=0x0500",
+        "-D_WIN32",
+        "-DWIN32_LEAN_AND_MEAN",
+        "-DBOOST_ALL_NO_LIB",
+        "-DBOOST_THREAD_USE_LIB",
+        "-DBOOST_WINDOWS",
+        "-DBOOST_WINDOWS_API",
+        "-DWIN32",
+        "-DUNICODE",
+        "-D_UNICODE",
+        "-D_SCL_SECURE_NO_WARNINGS",
+        "/O2",
+        "/Ob2",
+        "/W3",
+        "/GR",
+        "/MD",
+        "/wd4675",
+        "/Zc:wchar_t",
+        "/Zc:forScope",
+        "/EHsc",
+        "-c",
+        ]
+else:
+    _extra_compile_args += ["-Wno-missing-braces"]
+
+removals = ["-Wstrict-prototypes"]
+
+if not windows_check():
+    if python_version == '2.5':
+        cv_opt = sysconfig.get_config_vars()["CFLAGS"]
+        for removal in removals:
+            cv_opt = cv_opt.replace(removal, " ")
+        sysconfig.get_config_vars()["CFLAGS"] = " ".join(cv_opt.split())
+    else:
+        cv_opt = sysconfig.get_config_vars()["OPT"]
+        for removal in removals:
+            cv_opt = cv_opt.replace(removal, " ")
+        sysconfig.get_config_vars()["OPT"] = " ".join(cv_opt.split())
+
+_library_dirs = [
+]
+
+_include_dirs = [
+    './libtorrent',
+    './libtorrent/include',
+    './libtorrent/include/libtorrent'
+]
+
+if windows_check():
+    _include_dirs += ['./win32/include','./win32/include/openssl', 
'./win32/include/zlib']
+    _library_dirs += ['./win32/lib']
+    _libraries = [
+        'advapi32',
+        'boost_filesystem-vc-mt-1_37',
+        'boost_date_time-vc-mt-1_37',
+        'boost_iostreams-vc-mt-1_37',
+        'boost_python-vc-mt-1_37',
+        'boost_system-vc-mt-1_37',
+        'boost_thread-vc-mt-1_37',
+        'gdi32',
+        'libeay32',
+        'ssleay32',
+        'ws2_32',
+        'wsock32',
+        'zlib'
+    ]
+else:
+    _include_dirs += [
+        '/usr/include/python' + python_version,
+        sysconfig.get_config_var("INCLUDEDIR")
+        ]
+    for include in os.environ.get("INCLUDEDIR", "").split(":"):
+        _include_dirs.append(include)
+
+    _library_dirs += [sysconfig.get_config_var("LIBDIR"), '/opt/local/lib']
+    if osx_check():
+        _include_dirs += [
+            '/opt/local/include/boost-1_35',
+            '/opt/local/include/boost-1_36',
+            '/sw/include/boost-1_35',
+            '/sw/include/boost'
+        ]
+    _libraries = [
+        'boost_filesystem',
+        'boost_date_time',
+        'boost_iostreams',
+        'boost_python',
+        'boost_thread',
+        'pthread',
+        'ssl',
+        'z'
+        ]
+
+    if not windows_check():
+        dynamic_lib_extension = ".so"
+        if osx_check():
+            dynamic_lib_extension = ".dylib"
+
+        _lib_extensions = ['-mt_1_39', '-mt-1_38', '-mt-1_37', '-mt-1_36', 
'-mt-1_35', '-mt']
+
+        # Modify the libs if necessary for systems with only -mt boost libs
+        for lib in _libraries:
+            if lib[:6] == "boost_":
+                for lib_prefix in _library_dirs:
+                    for lib_suffix in _lib_extensions:
+                        # If there is a -mt version use that
+                        if os.path.exists(os.path.join(lib_prefix, "lib" + lib 
+ lib_suffix + dynamic_lib_extension)):
+                            _libraries[_libraries.index(lib)] = lib + 
lib_suffix
+                            lib = lib + lib_suffix
+                            break
+
+_sources = glob.glob("./libtorrent/src/*.cpp") + \
+                        glob.glob("./libtorrent/src/*.c") + \
+                        glob.glob("./libtorrent/src/kademlia/*.cpp") + \
+                        glob.glob("./libtorrent/bindings/python/src/*.cpp")
+
+# Remove some files from the source that aren't needed
+_source_removals = ["mapped_storage.cpp", "memdebug.cpp"]
+to_remove = []
+for source in _sources:
+    for rem in _source_removals:
+        if rem in source:
+            to_remove.append(source)
+
+for rem in to_remove:
+    _sources.remove(rem)
+
+_ext_modules = []
+
+# Check for a system libtorrent and if found, then do not build the libtorrent 
extension
+build_libtorrent = True
+try:
+    import libtorrent
+except ImportError:
+    build_libtorrent = True
+else:
+    if libtorrent.version_major == 0 and libtorrent.version_minor == 14:
+        build_libtorrent = False
+
+if build_libtorrent:
+    # There isn't a system libtorrent library, so let's build the one included 
with deluge
+    libtorrent = Extension(
+        'libtorrent',
+        extra_compile_args = _extra_compile_args,
+        include_dirs = _include_dirs,
+        libraries = _libraries,
+        library_dirs = _library_dirs,
+        sources = _sources
+    )
+
+    _ext_modules = [libtorrent]
+
+class build_trans(cmd.Command):
+    description = 'Compile .po files into .mo files'
+
+    user_options = [
+            ('build-lib', None, "lib build folder")
+    ]
+
+    def initialize_options(self):
+        self.build_lib = None
+
+    def finalize_options(self):
+        self.set_undefined_options('build', ('build_lib', 'build_lib'))
+
+    def run(self):
+        po_dir = os.path.join(os.path.dirname(__file__), 'deluge/i18n/')
+        for path, names, filenames in os.walk(po_dir):
+            for f in filenames:
+                if f.endswith('.po'):
+                    lang = f[:len(f) - 3]
+                    src = os.path.join(path, f)
+                    dest_path = os.path.join(self.build_lib, 'deluge', 'i18n', 
lang, \
+                        'LC_MESSAGES')
+                    dest = os.path.join(dest_path, 'deluge.mo')
+                    if not os.path.exists(dest_path):
+                        os.makedirs(dest_path)
+                    if not os.path.exists(dest):
+                        print('Compiling %s' % src)
+                        msgfmt.make(src, dest)
+                    else:
+                        src_mtime = os.stat(src)[8]
+                        dest_mtime = os.stat(dest)[8]
+                        if src_mtime > dest_mtime:
+                            print('Compiling %s' % src)
+                            msgfmt.make(src, dest)
+
+class build_plugins(cmd.Command):
+    description = "Build plugins into .eggs"
+
+    user_options = []
+
+    def initialize_options(self):
+        pass
+
+    def finalize_options(self):
+        pass
+
+    def run(self):
+        # Build the plugin eggs
+        PLUGIN_PATH = "deluge/plugins/*"
+
+        for path in glob.glob(PLUGIN_PATH):
+            if os.path.exists(os.path.join(path, "setup.py")):
+                os.system("cd " + path + "&& " + sys.executable + " setup.py 
bdist_egg -d ..")
+
+class build(_build):
+    sub_commands = [('build_trans', None), ('build_plugins', None)] + 
_build.sub_commands
+    def run(self):
+        # Run all sub-commands (at least those that need to be run)
+        _build.run(self)
+
+class clean_plugins(cmd.Command):
+    description = "Cleans the plugin folders"
+    user_options = [
+         ('all', 'a', "remove all build output, not just temporary 
by-products")
+    ]
+    boolean_options = ['all']
+
+    def initialize_options(self):
+        self.all = None
+
+    def finalize_options(self):
+        self.set_undefined_options('clean', ('all', 'all'))
+
+    def run(self):
+        print("Cleaning the plugin folders..")
+
+        PLUGIN_PATH = "deluge/plugins/*"
+
+        for path in glob.glob(PLUGIN_PATH):
+            if os.path.exists(os.path.join(path, "setup.py")):
+                c = "cd " + path + "&& " + sys.executable + " setup.py clean"
+                if self.all:
+                    c += " -a"
+                os.system(c)
+
+            # Delete the .eggs
+            if path[-4:] == ".egg":
+                print("Deleting %s" % path)
+                os.remove(path)
+
+class clean(_clean):
+    sub_commands = _clean.sub_commands + [('clean_plugins', None)]
+
+    def run(self):
+        # Run all sub-commands (at least those that need to be run)
+        for cmd_name in self.get_sub_commands():
+            self.run_command(cmd_name)
+        _clean.run(self)
+
+class install(_install):
+    def run(self):
+        for cmd_name in self.get_sub_commands():
+            self.run_command(cmd_name)
+        _install.run(self)
+        if not self.root:
+            self.do_egg_install()
+
+cmdclass = {
+    'build': build,
+    'build_trans': build_trans,
+    'build_plugins': build_plugins,
+    'clean_plugins': clean_plugins,
+    'clean': clean,
+    'install': install
+}
+
+# Data files to be installed to the system
+_data_files = [
+    ('share/icons/scalable/apps', 
['deluge/data/icons/scalable/apps/deluge.svg']),
+    ('share/icons/hicolor/128x128/apps', 
['deluge/data/icons/hicolor/128x128/apps/deluge.png']),
+    ('share/icons/hicolor/16x16/apps', 
['deluge/data/icons/hicolor/16x16/apps/deluge.png']),
+    ('share/icons/hicolor/192x192/apps', 
['deluge/data/icons/hicolor/192x192/apps/deluge.png']),
+    ('share/icons/hicolor/22x22/apps', 
['deluge/data/icons/hicolor/22x22/apps/deluge.png']),
+    ('share/icons/hicolor/24x24/apps', 
['deluge/data/icons/hicolor/24x24/apps/deluge.png']),
+    ('share/icons/hicolor/256x256/apps', 
['deluge/data/icons/hicolor/256x256/apps/deluge.png']),
+    ('share/icons/hicolor/32x32/apps', 
['deluge/data/icons/hicolor/32x32/apps/deluge.png']),
+    ('share/icons/hicolor/36x36/apps', 
['deluge/data/icons/hicolor/36x36/apps/deluge.png']),
+    ('share/icons/hicolor/48x48/apps', 
['deluge/data/icons/hicolor/48x48/apps/deluge.png']),
+    ('share/icons/hicolor/64x64/apps', 
['deluge/data/icons/hicolor/64x64/apps/deluge.png']),
+    ('share/icons/hicolor/72x72/apps', 
['deluge/data/icons/hicolor/72x72/apps/deluge.png']),
+    ('share/icons/hicolor/96x96/apps', 
['deluge/data/icons/hicolor/96x96/apps/deluge.png']),
+    ('share/applications', ['deluge/data/share/applications/deluge.desktop']),
+    ('share/pixmaps', ['deluge/data/pixmaps/deluge.png', 
'deluge/data/pixmaps/deluge.xpm']),
+    ('share/man/man1', ['deluge/docs/man/deluge.1', 
'deluge/docs/man/deluged.1'])
+]
+
+# Main setup
+setup(
+    author = "Andrew Resch, Marcos Pinto, Martijn Voncken, Damien Churchill",
+    author_email = "[email protected], [email protected], 
[email protected], [email protected]",
+    cmdclass = cmdclass,
+    data_files = _data_files,
+    description = "Bittorrent Client",
+    long_description = """Deluge is a bittorrent client that utilizes a
+        daemon/client model. There are various user interfaces available for
+        Deluge such as the GTKui, the webui and a console ui. Deluge uses
+        libtorrent in it's backend to handle the bittorrent protocol.""",
+    keywords = "torrent bittorrent p2p fileshare filesharing",
+    entry_points = """
+        [console_scripts]
+            deluge = deluge.main:start_ui
+            deluge-console = deluge.ui.console:start
+            deluge-gtk = deluge.ui.gtkui:start
+            deluge-web = deluge.ui.web:start
+            deluged = deluge.main:start_daemon
+    """,
+    ext_package = "deluge",
+    ext_modules = _ext_modules,
+    fullname = "Deluge Bittorrent Client",
+    include_package_data = True,
+    license = "GPLv3",
+    name = "deluge",
+    package_data = {"deluge": ["ui/gtkui/glade/*.glade",
+                                "data/pixmaps/*.png",
+                                "data/pixmaps/*.svg",
+                                "data/pixmaps/*.ico",
+                                "data/pixmaps/flags/*.png",
+                                "data/revision",
+                                "data/GeoIP.dat",
+                                "plugins/*.egg",
+                                "i18n/*.pot",
+                                "i18n/*/LC_MESSAGES/*.mo",
+                                "ui/web/gettext.js",
+                                "ui/web/index.html",
+                                "ui/web/css/*.css",
+                                "ui/web/icons/*.png",
+                                "ui/web/images/*.png",
+                                "ui/web/js/*.js",
+                                "ui/web/render/*.html",
+                                "ui/web/themes/*/*/*"
+                                ]},
+    packages = find_packages(exclude=["plugins"]),
+    url = "http://deluge-torrent.org";,
+    version = "1.2.0",
+)



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"deluge-commit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/deluge-commit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to