Commit 8cffdd9c authored by Vinay Sajip's avatar Vinay Sajip

Closes #15367: Corrected computation of include locations for source builds on...

Closes #15367: Corrected computation of include locations for source builds on Windows. Thanks to Richard Oudkerk for the bug report and patch.
parent 048b0637
...@@ -8,6 +8,7 @@ import sys, os, re ...@@ -8,6 +8,7 @@ import sys, os, re
from distutils.core import Command from distutils.core import Command
from distutils.errors import * from distutils.errors import *
from distutils.sysconfig import customize_compiler, get_python_version from distutils.sysconfig import customize_compiler, get_python_version
from distutils.sysconfig import get_config_h_filename
from distutils.dep_util import newer_group from distutils.dep_util import newer_group
from distutils.extension import Extension from distutils.extension import Extension
from distutils.util import get_platform from distutils.util import get_platform
...@@ -196,7 +197,10 @@ class build_ext(Command): ...@@ -196,7 +197,10 @@ class build_ext(Command):
# Append the source distribution include and library directories, # Append the source distribution include and library directories,
# this allows distutils on windows to work in the source tree # this allows distutils on windows to work in the source tree
self.include_dirs.append(os.path.join(sys.exec_prefix, 'PC')) self.include_dirs.append(os.path.dirname(get_config_h_filename()))
_sys_home = getattr(sys, '_home', None)
if _sys_home:
self.library_dirs.append(_sys_home)
if MSVC_VERSION >= 9: if MSVC_VERSION >= 9:
# Use the .lib files for the correct architecture # Use the .lib files for the correct architecture
if self.plat_name == 'win32': if self.plat_name == 'win32':
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment