diff --git a/bindings/python/setup.py b/bindings/python/setup.py index 78faf436ab6..a30d9eec6b6 100755 --- a/bindings/python/setup.py +++ b/bindings/python/setup.py @@ -93,7 +93,10 @@ def write_b2_python_config(target, config): # necessary everywhere else, or else b2 will just build "libtorrent.so". # python.jam appends SHLIB_SUFFIX on its own. target = target.name.split("libtorrent")[1] - suffix = sysconfig.get_config_var("SHLIB_SUFFIX") + if os.name == "nt": + suffix = sysconfig.get_config_var("EXT_SUFFIX") + else: + suffix = sysconfig.get_config_var("SHLIB_SUFFIX") if suffix != None and target.endswith(suffix): target = target[:-len(suffix)]