From: doko@ubuntu.com Date: Sat, 30 Jun 2012 20:35:00 +0000 (+0200) Subject: - Issue #14330: For cross builds, don't use host python, use host search paths X-Git-Tag: v3.3.0b2~353^2~2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7e6c2e2cc49fa109662d3f04f4c3553596d31937;p=python - Issue #14330: For cross builds, don't use host python, use host search paths for host compiler. Add NEWS entry, rename _PROJECT_BASE to _PYTHON_PROJECT_BASE. --- diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py index eccd3041a4..4f0a9a920c 100644 --- a/Lib/sysconfig.py +++ b/Lib/sysconfig.py @@ -139,8 +139,8 @@ if os.name == "nt" and "\\pcbuild\\amd64" in _PROJECT_BASE[-14:].lower(): _PROJECT_BASE = _safe_realpath(os.path.join(_PROJECT_BASE, pardir, pardir)) # set for cross builds -if "_PROJECT_BASE" in os.environ: - _PROJECT_BASE = _safe_realpath(os.environ["_PROJECT_BASE"]) +if "_PYTHON_PROJECT_BASE" in os.environ: + _PROJECT_BASE = _safe_realpath(os.environ["_PYTHON_PROJECT_BASE"]) def _is_python_source_dir(d): for fn in ("Setup.dist", "Setup.local"): diff --git a/Misc/NEWS b/Misc/NEWS index 4d1f104828..bca959b550 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -42,6 +42,13 @@ Tools/Demos * C frames that are garbage-collecting * C frames that are due to the invocation of a PyCFunction +Build +----- + +- Issue #14330: For cross builds, don't use host python, use host search paths + for host compiler. + + What's New in Python 3.3.0 Beta 1? ================================== diff --git a/configure b/configure index 816b8e8927..a60c701148 100755 --- a/configure +++ b/configure @@ -2898,7 +2898,7 @@ $as_echo_n "checking for python interpreter for cross build... " >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5 $as_echo "$interp" >&6; } - PYTHON_FOR_BUILD="_PROJECT_BASE=$srcdir"' _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(srcdir)/Lib:$(srcdir)/Lib/plat-$(MACHDEP) '$interp + PYTHON_FOR_BUILD="_PYTHON_PROJECT_BASE=$srcdir"' _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(srcdir)/Lib:$(srcdir)/Lib/plat-$(MACHDEP) '$interp fi else PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E' diff --git a/configure.ac b/configure.ac index 91a588a58c..2aaec844c4 100644 --- a/configure.ac +++ b/configure.ac @@ -49,7 +49,7 @@ if test "$cross_compiling" = yes; then AC_MSG_ERROR([python$PACKAGE_VERSION interpreter not found]) fi AC_MSG_RESULT($interp) - PYTHON_FOR_BUILD="_PROJECT_BASE=$srcdir"' _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(srcdir)/Lib:$(srcdir)/Lib/plat-$(MACHDEP) '$interp + PYTHON_FOR_BUILD="_PYTHON_PROJECT_BASE=$srcdir"' _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(srcdir)/Lib:$(srcdir)/Lib/plat-$(MACHDEP) '$interp fi else PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'