mirror of
https://github.com/codex-storage/deluge.git
synced 2025-02-23 08:38:16 +00:00
Deluge will now use a system libtorrent library if available.
This commit is contained in:
parent
646901d8da
commit
86d1624cff
@ -33,6 +33,9 @@
|
|||||||
|
|
||||||
import os
|
import os
|
||||||
|
|
||||||
|
try:
|
||||||
|
import libtorrent as lt
|
||||||
|
except ImportError:
|
||||||
import deluge.libtorrent as lt
|
import deluge.libtorrent as lt
|
||||||
import deluge.component as component
|
import deluge.component as component
|
||||||
from deluge.configmanager import ConfigManager
|
from deluge.configmanager import ConfigManager
|
||||||
|
@ -46,6 +46,9 @@ import gobject
|
|||||||
import threading
|
import threading
|
||||||
import socket
|
import socket
|
||||||
|
|
||||||
|
try:
|
||||||
|
import libtorrent as lt
|
||||||
|
except ImportError:
|
||||||
import deluge.libtorrent as lt
|
import deluge.libtorrent as lt
|
||||||
import deluge.configmanager
|
import deluge.configmanager
|
||||||
import deluge.common
|
import deluge.common
|
||||||
|
@ -37,6 +37,9 @@ import pickle
|
|||||||
import cPickle
|
import cPickle
|
||||||
import shutil
|
import shutil
|
||||||
|
|
||||||
|
try:
|
||||||
|
import libtorrent as lt
|
||||||
|
except ImportError:
|
||||||
import deluge.libtorrent as lt
|
import deluge.libtorrent as lt
|
||||||
from deluge.configmanager import ConfigManager
|
from deluge.configmanager import ConfigManager
|
||||||
import deluge.core.torrentmanager
|
import deluge.core.torrentmanager
|
||||||
|
@ -35,6 +35,9 @@ import os.path
|
|||||||
import threading
|
import threading
|
||||||
import gobject
|
import gobject
|
||||||
|
|
||||||
|
try:
|
||||||
|
import libtorrent as lt
|
||||||
|
except ImportError:
|
||||||
import deluge.libtorrent as lt
|
import deluge.libtorrent as lt
|
||||||
import deluge.configmanager
|
import deluge.configmanager
|
||||||
import deluge.common
|
import deluge.common
|
||||||
|
@ -36,6 +36,9 @@
|
|||||||
import os
|
import os
|
||||||
from urlparse import urlparse
|
from urlparse import urlparse
|
||||||
|
|
||||||
|
try:
|
||||||
|
import libtorrent as lt
|
||||||
|
except ImportError:
|
||||||
import deluge.libtorrent as lt
|
import deluge.libtorrent as lt
|
||||||
import deluge.common
|
import deluge.common
|
||||||
import deluge.component as component
|
import deluge.component as component
|
||||||
|
@ -40,6 +40,9 @@ import time
|
|||||||
|
|
||||||
import gobject
|
import gobject
|
||||||
|
|
||||||
|
try:
|
||||||
|
import libtorrent as lt
|
||||||
|
except ImportError:
|
||||||
import deluge.libtorrent as lt
|
import deluge.libtorrent as lt
|
||||||
|
|
||||||
import deluge.common
|
import deluge.common
|
||||||
|
7
setup.py
7
setup.py
@ -188,6 +188,9 @@ for source in _sources:
|
|||||||
_sources.remove(source)
|
_sources.remove(source)
|
||||||
break
|
break
|
||||||
|
|
||||||
|
_ext_modules = []
|
||||||
|
if not os.path.exists(os.path.join(sysconfig.get_config_var("LIBDIR"), "libtorrent-rasterbar.so.1")):
|
||||||
|
# There isn't a system libtorrent library, so let's build the one included with deluge
|
||||||
libtorrent = Extension(
|
libtorrent = Extension(
|
||||||
'libtorrent',
|
'libtorrent',
|
||||||
extra_compile_args = _extra_compile_args,
|
extra_compile_args = _extra_compile_args,
|
||||||
@ -197,6 +200,8 @@ libtorrent = Extension(
|
|||||||
sources = _sources
|
sources = _sources
|
||||||
)
|
)
|
||||||
|
|
||||||
|
_ext_modules = [libtorrent]
|
||||||
|
|
||||||
class build_trans(cmd.Command):
|
class build_trans(cmd.Command):
|
||||||
description = 'Compile .po files into .mo files'
|
description = 'Compile .po files into .mo files'
|
||||||
|
|
||||||
@ -298,7 +303,7 @@ setup(
|
|||||||
deluged = deluge.main:start_daemon
|
deluged = deluge.main:start_daemon
|
||||||
""",
|
""",
|
||||||
ext_package = "deluge",
|
ext_package = "deluge",
|
||||||
ext_modules = [libtorrent],
|
ext_modules = _ext_modules,
|
||||||
fullname = "Deluge Bittorent Client",
|
fullname = "Deluge Bittorent Client",
|
||||||
include_package_data = True,
|
include_package_data = True,
|
||||||
license = "GPLv3",
|
license = "GPLv3",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user