mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-03 23:18:40 +00:00
use the get_libtorrent.sh script to get libtorrent if it is missing
This commit is contained in:
parent
ee73936c26
commit
2c10218efd
1 changed files with 22 additions and 11 deletions
33
setup.py
33
setup.py
|
@ -211,18 +211,29 @@ except ImportError:
|
||||||
else:
|
else:
|
||||||
build_libtorrent = False
|
build_libtorrent = False
|
||||||
|
|
||||||
if build_libtorrent and os.path.exists("libtorrent") and os.listdir("libtorrent"):
|
if build_libtorrent:
|
||||||
# There isn't a system libtorrent library, so let's build the one included with deluge
|
got_libtorrent = False
|
||||||
libtorrent = Extension(
|
if not os.path.exists("libtorrent"):
|
||||||
'libtorrent',
|
import subprocess
|
||||||
extra_compile_args = _extra_compile_args,
|
if subprocess.call(['./get_libtorrent.sh']) > 0:
|
||||||
include_dirs = _include_dirs,
|
got_libtorrent = False
|
||||||
libraries = _libraries,
|
else:
|
||||||
library_dirs = _library_dirs,
|
got_libtorrent = True
|
||||||
sources = _sources
|
else:
|
||||||
)
|
got_libtorrent = True
|
||||||
|
|
||||||
_ext_modules = [libtorrent]
|
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):
|
class build_trans(cmd.Command):
|
||||||
description = 'Compile .po files into .mo files'
|
description = 'Compile .po files into .mo files'
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue