From cc29a99c9047b38b1a5391de42f7897ca01516f6 Mon Sep 17 00:00:00 2001 From: arvidn Date: Thu, 27 Aug 2015 06:52:13 -0400 Subject: [PATCH] (merge commit from Andrew Starr-Bochicchio ) 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. --- bindings/python/setup.py | 21 +++++++++++---------- simulation/libsimulator | 2 +- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/bindings/python/setup.py b/bindings/python/setup.py index f512e9101..a7b254ad9 100644 --- a/bindings/python/setup.py +++ b/bindings/python/setup.py @@ -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', diff --git a/simulation/libsimulator b/simulation/libsimulator index dc868f86c..c82420cd1 160000 --- a/simulation/libsimulator +++ b/simulation/libsimulator @@ -1 +1 @@ -Subproject commit dc868f86caa44fdb3fcf41e99b881a916a457781 +Subproject commit c82420cd1b6a83a028f51eeff6d19828136b466c