diff options
author | Tarek Ziadé <ziade.tarek@gmail.com> | 2010-04-30 12:18:51 (GMT) |
---|---|---|
committer | Tarek Ziadé <ziade.tarek@gmail.com> | 2010-04-30 12:18:51 (GMT) |
commit | 68ca24b2f9173940ac532d37b8c8cc3e72a07378 (patch) | |
tree | 9410edc1235510ad3f00b7841025ca015f4b5ab3 | |
parent | 6ea795ed498413d63c48e3d338d44c80a0f08c79 (diff) | |
download | cpython-68ca24b2f9173940ac532d37b8c8cc3e72a07378.zip cpython-68ca24b2f9173940ac532d37b8c8cc3e72a07378.tar.gz cpython-68ca24b2f9173940ac532d37b8c8cc3e72a07378.tar.bz2 |
Merged revisions 80649 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r80649 | tarek.ziade | 2010-04-30 14:15:12 +0200 (Fri, 30 Apr 2010) | 1 line
Fixed #8577. distutils.sysconfig.get_python_inc() now differenciates buildir and srcdir
........
-rw-r--r-- | Lib/distutils/sysconfig.py | 14 | ||||
-rw-r--r-- | Misc/NEWS | 4 |
2 files changed, 13 insertions, 5 deletions
diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py index 54ccec4..bb53315 100644 --- a/Lib/distutils/sysconfig.py +++ b/Lib/distutils/sysconfig.py @@ -71,15 +71,19 @@ def get_python_inc(plat_specific=0, prefix=None): """ if prefix is None: prefix = plat_specific and EXEC_PREFIX or PREFIX + if os.name == "posix": if python_build: - base = os.path.dirname(os.path.abspath(sys.executable)) + buildir = os.path.dirname(sys.executable) if plat_specific: - inc_dir = base + # python.h is located in the buildir + inc_dir = buildir else: - inc_dir = os.path.join(base, "Include") - if not os.path.exists(inc_dir): - inc_dir = os.path.join(os.path.dirname(base), "Include") + # the source dir is relative to the buildir + srcdir = os.path.abspath(os.path.join(buildir, + get_config_var('srcdir'))) + # Include is located in the srcdir + inc_dir = os.path.join(srcdir, "Include") return inc_dir return os.path.join(prefix, "include", "python" + get_python_version()) elif os.name == "nt": @@ -33,6 +33,10 @@ Core and Builtins Library ------- +- Issue #8577: distutils.sysconfig.get_python_inc() now makes a difference + between the build dir and the source dir when looking for "python.h" or + "Include". + - Issue #8464: tarfile no longer creates files with execute permissions set when mode="w|" is used. |