Module: deluge Branch: 1.2-stable Commit: 2c10218efd78af213601b14a3d0e6f1163fc8e09
Author: Damien Churchill <[email protected]> Date: Thu Jul 22 21:13:26 2010 +0100 use the get_libtorrent.sh script to get libtorrent if it is missing --- setup.py | 35 +++++++++++++++++++++++------------ 1 files changed, 23 insertions(+), 12 deletions(-) diff --git a/setup.py b/setup.py index ca1658f..c262138 100644 --- a/setup.py +++ b/setup.py @@ -211,18 +211,29 @@ except ImportError: else: build_libtorrent = False -if build_libtorrent and os.path.exists("libtorrent") and os.listdir("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] +if build_libtorrent: + got_libtorrent = False + if not os.path.exists("libtorrent"): + import subprocess + if subprocess.call(['./get_libtorrent.sh']) > 0: + got_libtorrent = False + else: + got_libtorrent = True + else: + got_libtorrent = True + + if got_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' -- 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.
