Changeset 4026

Show
Ignore:
Timestamp:
10/17/08 17:52:12 (3 months ago)
Author:
andar
Message:

Deluge will now use a system libtorrent library if available.

Files:
16 modified

Legend:

Unmodified
Added
Removed
  • branches/1.0.0_RC/ChangeLog

    r4022 r4026  
    99 
    1010 WebUI: 
    11  * Fix White template for Opera 
     11  * Fix White template for Opera 
     12  
     13 Misc: 
     14  * Deluge will now use a system libtorrent library if available. 
     15  * The build system will no longer build libtorrent if a system library is 
     16    detected. 
    1217 
    1318Deluge 1.0.2 (10 October 2008) 
  • branches/1.0.0_RC/deluge/core/alertmanager.py

    r3824 r4026  
    3737 
    3838import deluge.component as component 
    39 import deluge.libtorrent as lt 
     39try: 
     40    import libtorrent as lt 
     41except ImportError: 
     42    import deluge.libtorrent as lt 
    4043from deluge.log import LOG as log 
    4144 
  • branches/1.0.0_RC/deluge/core/autoadd.py

    r3718 r4026  
    3434import os 
    3535 
    36 import deluge.libtorrent as lt 
     36try: 
     37    import libtorrent as lt 
     38except ImportError: 
     39    import deluge.libtorrent as lt 
    3740import deluge.component as component 
    3841from deluge.configmanager import ConfigManager 
  • branches/1.0.0_RC/deluge/core/core.py

    r4019 r4026  
    4747import socket 
    4848 
    49 import deluge.libtorrent as lt 
     49try: 
     50    import libtorrent as lt 
     51except ImportError: 
     52    import deluge.libtorrent as lt 
     53     
    5054import deluge.configmanager 
    5155import deluge.common 
  • branches/1.0.0_RC/deluge/core/oldstateupgrader.py

    r3734 r4026  
    3838import shutil 
    3939 
    40 import deluge.libtorrent as lt 
     40try: 
     41    import libtorrent as lt 
     42except ImportError: 
     43    import deluge.libtorrent as lt 
    4144from deluge.configmanager import ConfigManager 
    4245import deluge.core.torrentmanager 
  • branches/1.0.0_RC/deluge/core/torrent.py

    r4014 r4026  
    3636import os 
    3737 
    38 import deluge.libtorrent as lt 
     38try: 
     39    import libtorrent as lt 
     40except ImportError: 
     41    import deluge.libtorrent as lt 
    3942import deluge.common 
    4043import deluge.component as component 
  • branches/1.0.0_RC/deluge/core/torrentmanager.py

    r3895 r4026  
    4141import gobject 
    4242 
    43 import deluge.libtorrent as lt 
     43try: 
     44    import libtorrent as lt 
     45except ImportError: 
     46    import deluge.libtorrent as lt 
    4447 
    4548import deluge.common 
  • branches/1.0.0_RC/deluge/ui/gtkui/addtorrentdialog.py

    r3771 r4026  
    180180                 
    181181    def add_from_files(self, filenames): 
    182         import deluge.libtorrent as lt 
     182        try: 
     183            import libtorrent as lt 
     184        except ImportError: 
     185            import deluge.libtorrent as lt 
    183186        import os.path 
    184187        new_row = None 
  • branches/1.0.0_RC/setup.py

    r3966 r4026  
    166166            break 
    167167 
    168 libtorrent = Extension( 
    169     'libtorrent', 
    170     extra_compile_args = _extra_compile_args, 
    171     include_dirs = _include_dirs, 
    172     libraries = _libraries, 
    173     library_dirs = _library_dirs, 
    174     sources = _sources 
    175 ) 
     168_ext_modules = [] 
     169if not os.path.exists(os.path.join(sysconfig.get_config_var("LIBDIR"), "libtorrent-rasterbar.so.1")): 
     170    # There isn't a system libtorrent library, so let's build the one included with deluge 
     171    libtorrent = Extension( 
     172        'libtorrent', 
     173        extra_compile_args = _extra_compile_args, 
     174        include_dirs = _include_dirs, 
     175        libraries = _libraries, 
     176        library_dirs = _library_dirs, 
     177        sources = _sources 
     178    ) 
     179     
     180    _ext_modules = [libtorrent] 
    176181 
    177182class build_trans(cmd.Command): 
  • trunk/deluge/core/autoadd.py

    r3718 r4026  
    3434import os 
    3535 
    36 import deluge.libtorrent as lt 
     36try: 
     37    import libtorrent as lt 
     38except ImportError: 
     39    import deluge.libtorrent as lt 
    3740import deluge.component as component 
    3841from deluge.configmanager import ConfigManager 
  • trunk/deluge/core/core.py

    r4019 r4026  
    4747import socket 
    4848 
    49 import deluge.libtorrent as lt 
     49try: 
     50    import libtorrent as lt 
     51except ImportError: 
     52    import deluge.libtorrent as lt 
    5053import deluge.configmanager 
    5154import deluge.common 
  • trunk/deluge/core/oldstateupgrader.py

    r3734 r4026  
    3838import shutil 
    3939 
    40 import deluge.libtorrent as lt 
     40try: 
     41    import libtorrent as lt 
     42except ImportError: 
     43    import deluge.libtorrent as lt 
    4144from deluge.configmanager import ConfigManager 
    4245import deluge.core.torrentmanager 
  • trunk/deluge/core/preferencesmanager.py

    r3950 r4026  
    3636import gobject 
    3737 
    38 import deluge.libtorrent as lt 
     38try: 
     39    import libtorrent as lt 
     40except ImportError: 
     41    import deluge.libtorrent as lt 
    3942import deluge.configmanager 
    4043import deluge.common 
  • trunk/deluge/core/torrent.py

    r4020 r4026  
    3737from urlparse import urlparse 
    3838 
    39 import deluge.libtorrent as lt 
     39try: 
     40    import libtorrent as lt 
     41except ImportError: 
     42    import deluge.libtorrent as lt 
    4043import deluge.common 
    4144import deluge.component as component 
  • trunk/deluge/core/torrentmanager.py

    r4020 r4026  
    4141import gobject 
    4242 
    43 import deluge.libtorrent as lt 
     43try: 
     44    import libtorrent as lt 
     45except ImportError: 
     46    import deluge.libtorrent as lt 
    4447 
    4548import deluge.common 
  • trunk/setup.py

    r3966 r4026  
    189189            break 
    190190 
    191 libtorrent = Extension( 
    192     'libtorrent', 
    193     extra_compile_args = _extra_compile_args, 
    194     include_dirs = _include_dirs, 
    195     libraries = _libraries, 
    196     library_dirs = _library_dirs, 
    197     sources = _sources 
    198 ) 
     191_ext_modules = [] 
     192if not os.path.exists(os.path.join(sysconfig.get_config_var("LIBDIR"), "libtorrent-rasterbar.so.1")): 
     193    # There isn't a system libtorrent library, so let's build the one included with deluge 
     194    libtorrent = Extension( 
     195        'libtorrent', 
     196        extra_compile_args = _extra_compile_args, 
     197        include_dirs = _include_dirs, 
     198        libraries = _libraries, 
     199        library_dirs = _library_dirs, 
     200        sources = _sources 
     201    ) 
     202     
     203    _ext_modules = [libtorrent] 
    199204 
    200205class build_trans(cmd.Command): 
     
    299304    """, 
    300305    ext_package = "deluge", 
    301     ext_modules = [libtorrent], 
     306    ext_modules = _ext_modules, 
    302307    fullname = "Deluge Bittorent Client", 
    303308    include_package_data = True,