Deluge will now use a system libtorrent library if available.

This commit is contained in:
Andrew Resch 2008-10-17 17:52:12 +00:00
commit cc7e6d1ff2
9 changed files with 48 additions and 16 deletions

View file

@ -10,6 +10,11 @@ Deluge 1.0.3 (In Development)
WebUI:
* Fix White template for Opera
Misc:
* Deluge will now use a system libtorrent library if available.
* The build system will no longer build libtorrent if a system library is
detected.
Deluge 1.0.2 (10 October 2008)
Core:
* Fix issue where torrents will not be properly added to the session

View file

@ -36,6 +36,9 @@
import gobject
import deluge.component as component
try:
import libtorrent as lt
except ImportError:
import deluge.libtorrent as lt
from deluge.log import LOG as log

View file

@ -33,6 +33,9 @@
import os
try:
import libtorrent as lt
except ImportError:
import deluge.libtorrent as lt
import deluge.component as component
from deluge.configmanager import ConfigManager

View file

@ -46,7 +46,11 @@ import gobject
import threading
import socket
try:
import libtorrent as lt
except ImportError:
import deluge.libtorrent as lt
import deluge.configmanager
import deluge.common
import deluge.component as component

View file

@ -37,6 +37,9 @@ import pickle
import cPickle
import shutil
try:
import libtorrent as lt
except ImportError:
import deluge.libtorrent as lt
from deluge.configmanager import ConfigManager
import deluge.core.torrentmanager

View file

@ -35,6 +35,9 @@
import os
try:
import libtorrent as lt
except ImportError:
import deluge.libtorrent as lt
import deluge.common
import deluge.component as component

View file

@ -40,6 +40,9 @@ import time
import gobject
try:
import libtorrent as lt
except ImportError:
import deluge.libtorrent as lt
import deluge.common

View file

@ -179,6 +179,9 @@ class AddTorrentDialog(component.Component):
break
def add_from_files(self, filenames):
try:
import libtorrent as lt
except ImportError:
import deluge.libtorrent as lt
import os.path
new_row = None

View file

@ -165,6 +165,9 @@ for source in _sources:
_sources.remove(source)
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',
extra_compile_args = _extra_compile_args,
@ -174,6 +177,8 @@ libtorrent = Extension(
sources = _sources
)
_ext_modules = [libtorrent]
class build_trans(cmd.Command):
description = 'Compile .po files into .mo files'