File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88from distutils .core import Command
99from distutils .errors import *
1010from distutils .sysconfig import customize_compiler , get_python_version
11+ from distutils .sysconfig import get_config_h_filename
1112from distutils .dep_util import newer_group
1213from distutils .extension import Extension
1314from distutils .util import get_platform
@@ -196,7 +197,10 @@ def finalize_options(self):
196197
197198 # Append the source distribution include and library directories,
198199 # this allows distutils on windows to work in the source tree
199- self .include_dirs .append (os .path .join (sys .exec_prefix , 'PC' ))
200+ self .include_dirs .append (os .path .dirname (get_config_h_filename ()))
201+ _sys_home = getattr (sys , '_home' , None )
202+ if _sys_home :
203+ self .library_dirs .append (_sys_home )
200204 if MSVC_VERSION >= 9 :
201205 # Use the .lib files for the correct architecture
202206 if self .plat_name == 'win32' :
You can’t perform that action at this time.
0 commit comments