- 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.
This commit is contained in:
doko@ubuntu.com 2012-06-30 22:35:00 +02:00
parent 1abe1c5fe1
commit 7e6c2e2cc4
4 changed files with 11 additions and 4 deletions

View File

@ -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)) _PROJECT_BASE = _safe_realpath(os.path.join(_PROJECT_BASE, pardir, pardir))
# set for cross builds # set for cross builds
if "_PROJECT_BASE" in os.environ: if "_PYTHON_PROJECT_BASE" in os.environ:
_PROJECT_BASE = _safe_realpath(os.environ["_PROJECT_BASE"]) _PROJECT_BASE = _safe_realpath(os.environ["_PYTHON_PROJECT_BASE"])
def _is_python_source_dir(d): def _is_python_source_dir(d):
for fn in ("Setup.dist", "Setup.local"): for fn in ("Setup.dist", "Setup.local"):

View File

@ -42,6 +42,13 @@ Tools/Demos
* C frames that are garbage-collecting * C frames that are garbage-collecting
* C frames that are due to the invocation of a PyCFunction * 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? What's New in Python 3.3.0 Beta 1?
================================== ==================================

2
configure vendored
View File

@ -2898,7 +2898,7 @@ $as_echo_n "checking for python interpreter for cross build... " >&6; }
fi fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
$as_echo "$interp" >&6; } $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 fi
else else
PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E' PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'

View File

@ -49,7 +49,7 @@ if test "$cross_compiling" = yes; then
AC_MSG_ERROR([python$PACKAGE_VERSION interpreter not found]) AC_MSG_ERROR([python$PACKAGE_VERSION interpreter not found])
fi fi
AC_MSG_RESULT($interp) 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 fi
else else
PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E' PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'