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++',