From a39f3714b2dba9c97ec08be2378e9f9f8dd92912 Mon Sep 17 00:00:00 2001 From: arvidn Date: Wed, 7 Dec 2016 20:09:57 -0500 Subject: [PATCH] fix python build with CC/CXX environment --- ChangeLog | 1 + bindings/python/setup.py | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/ChangeLog b/ChangeLog index fbe011249..93a6e8747 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,4 @@ + * fix python build with CC/CXX environment * add trackers from add_torrent_params/magnet links to separate tiers * fix resumedata check issue with files with priority 0 * deprecated mmap_cache feature diff --git a/bindings/python/setup.py b/bindings/python/setup.py index 69de9b95b..9492314e5 100644 --- a/bindings/python/setup.py +++ b/bindings/python/setup.py @@ -116,6 +116,13 @@ else: extra_link = flags.parse(ldflags) extra_compile = flags.parse(extra_cmd) + # for some reason distutils uses the CC environment variable to determine + # the compiler to use for C++ + if 'CXX' in os.environ: + os.environ['CC'] = os.environ['CXX'] + if 'CXXFLAGS' in os.environ: + os.environ['CFLAGS'] = os.environ['CXXFLAGS'] + ext = [Extension('libtorrent', sources = source_list, language='c++',