summaryrefslogtreecommitdiffstats
path: root/Lib/distutils
diff options
context:
space:
mode:
authorVinay Sajip <vinay_sajip@yahoo.co.uk>2012-07-16 17:24:55 (GMT)
committerVinay Sajip <vinay_sajip@yahoo.co.uk>2012-07-16 17:24:55 (GMT)
commit048b06378079acd1e62501335b881f28e6c1a9c5 (patch)
tree9e5373835e3d5d4e200f9f8909111b4b52da083b /Lib/distutils
parentc2d481fbcd1e7b6cda02efc0ebbcf940c548b9cb (diff)
downloadcpython-048b06378079acd1e62501335b881f28e6c1a9c5.zip
cpython-048b06378079acd1e62501335b881f28e6c1a9c5.tar.gz
cpython-048b06378079acd1e62501335b881f28e6c1a9c5.tar.bz2
Closes #15366: Corrected computation of include location for source builds. Thanks to Richard Oudkerk for the bug report and patch.
Diffstat (limited to 'Lib/distutils')
-rw-r--r--Lib/distutils/sysconfig.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py
index f6e5d99..409ef74 100644
--- a/Lib/distutils/sysconfig.py
+++ b/Lib/distutils/sysconfig.py
@@ -101,10 +101,11 @@ def get_python_inc(plat_specific=0, prefix=None):
base = _sys_home or os.path.dirname(os.path.abspath(sys.executable))
if plat_specific:
return base
+ if _sys_home:
+ incdir = os.path.join(_sys_home, get_config_var('AST_H_DIR'))
else:
- incdir = os.path.join(_sys_home or get_config_var('srcdir'),
- 'Include')
- return os.path.normpath(incdir)
+ incdir = os.path.join(get_config_var('srcdir'), 'Include')
+ return os.path.normpath(incdir)
python_dir = 'python' + get_python_version() + build_flags
return os.path.join(prefix, "include", python_dir)
elif os.name == "nt":