diff --git a/Lib/distutils/command/build_ext.py b/Lib/distutils/command/build_ext.py index 3f714c54d8f..76da00476c7 100644 --- a/Lib/distutils/command/build_ext.py +++ b/Lib/distutils/command/build_ext.py @@ -528,12 +528,13 @@ def get_ext_filename (self, ext_name): "foo\bar.pyd"). """ - from distutils import sysconfig + from distutils.sysconfig import get_config_var ext_path = string.split (ext_name, '.') # extensions in debug_mode are named 'module_d.pyd' under windows + so_ext = get_config_var('SO') if os.name == 'nt' and self.debug: - return apply (os.path.join, ext_path) + '_d' + sysconfig.SO - return apply (os.path.join, ext_path) + sysconfig.SO + return apply (os.path.join, ext_path) + '_d' + so_ext + return apply (os.path.join, ext_path) + so_ext def get_ext_libname (self, ext_name): # create a filename for the (unneeded) lib-file.