diff --git a/Lib/distutils/command/build_ext.py b/Lib/distutils/command/build_ext.py index b46ae085afc12d..e87e3ad5d4cbb4 100644 --- a/Lib/distutils/command/build_ext.py +++ b/Lib/distutils/command/build_ext.py @@ -227,7 +227,7 @@ def finalize_options(self): config_dir_name)) else: # building python standard extensions - self.library_dirs.append('.') + self.library_dirs.append(sysconfig.project_base) # For building extensions with a shared Python library, # Python's library directory must be appended to library_dirs @@ -238,7 +238,7 @@ def finalize_options(self): self.library_dirs.append(sysconfig.get_config_var('LIBDIR')) else: # building python standard extensions - self.library_dirs.append('.') + self.library_dirs.append(sysconfig.project_base) # The argument parsing will result in self.define being a string, but # it has to be a list of 2-tuples. All the preprocessor symbols