(merge commit from Andrew Starr-Bochicchio <asb@debian.org>) Running setup.py without LDFLAGS or explicitly passing includes will attempt to use bjam. This causes "python setup.py clean -a" to fail when building the package.

This commit is contained in:
arvidn 2015-08-27 06:52:13 -04:00
parent bd5793807c
commit cc29a99c90
2 changed files with 12 additions and 11 deletions

View File

@ -51,7 +51,7 @@ except:
ext = None
packages = None
if '--bjam' in sys.argv or ldflags == None or extra_cmd == None:
if '--bjam' in sys.argv:
if '--bjam' in sys.argv:
del sys.argv[sys.argv.index('--bjam')]
@ -94,15 +94,16 @@ else:
source_list = os.listdir(os.path.join(os.path.dirname(__file__), "src"))
source_list = [os.path.abspath(os.path.join(os.path.dirname(__file__), "src", s)) for s in source_list if s.endswith(".cpp")]
ext = [Extension('libtorrent',
sources = source_list,
language='c++',
include_dirs = parse_cmd(extra_cmd, '-I'),
library_dirs = parse_cmd(extra_cmd, '-L'),
extra_link_args = ldflags.split() + arch(),
extra_compile_args = parse_cmd(extra_cmd, '-D', True) + arch() \
+ target_specific(),
libraries = ['torrent-rasterbar'] + parse_cmd(extra_cmd, '-l'))]
if extra_cmd:
ext = [Extension('libtorrent',
sources = source_list,
language='c++',
include_dirs = parse_cmd(extra_cmd, '-I'),
library_dirs = parse_cmd(extra_cmd, '-L'),
extra_link_args = ldflags.split() + arch(),
extra_compile_args = parse_cmd(extra_cmd, '-D', True) + arch() \
+ target_specific(),
libraries = ['torrent-rasterbar'] + parse_cmd(extra_cmd, '-l'))]
setup(name = 'python-libtorrent',
version = '1.1.0',

@ -1 +1 @@
Subproject commit dc868f86caa44fdb3fcf41e99b881a916a457781
Subproject commit c82420cd1b6a83a028f51eeff6d19828136b466c