Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7e6c2e2

Browse files
committed
- 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.
1 parent 1abe1c5 commit 7e6c2e2

4 files changed

Lines changed: 11 additions & 4 deletions

File tree

Lib/sysconfig.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,8 @@ def _safe_realpath(path):
139139
_PROJECT_BASE = _safe_realpath(os.path.join(_PROJECT_BASE, pardir, pardir))
140140

141141
# set for cross builds
142-
if "_PROJECT_BASE" in os.environ:
143-
_PROJECT_BASE = _safe_realpath(os.environ["_PROJECT_BASE"])
142+
if "_PYTHON_PROJECT_BASE" in os.environ:
143+
_PROJECT_BASE = _safe_realpath(os.environ["_PYTHON_PROJECT_BASE"])
144144

145145
def _is_python_source_dir(d):
146146
for fn in ("Setup.dist", "Setup.local"):

Misc/NEWS

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,13 @@ Tools/Demos
4242
* C frames that are garbage-collecting
4343
* C frames that are due to the invocation of a PyCFunction
4444

45+
Build
46+
-----
47+
48+
- Issue #14330: For cross builds, don't use host python, use host search paths
49+
for host compiler.
50+
51+
4552
What's New in Python 3.3.0 Beta 1?
4653
==================================
4754

configure

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2898,7 +2898,7 @@ $as_echo_n "checking for python interpreter for cross build... " >&6; }
28982898
fi
28992899
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
29002900
$as_echo "$interp" >&6; }
2901-
PYTHON_FOR_BUILD="_PROJECT_BASE=$srcdir"' _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(srcdir)/Lib:$(srcdir)/Lib/plat-$(MACHDEP) '$interp
2901+
PYTHON_FOR_BUILD="_PYTHON_PROJECT_BASE=$srcdir"' _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(srcdir)/Lib:$(srcdir)/Lib/plat-$(MACHDEP) '$interp
29022902
fi
29032903
else
29042904
PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'

configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ if test "$cross_compiling" = yes; then
4949
AC_MSG_ERROR([python$PACKAGE_VERSION interpreter not found])
5050
fi
5151
AC_MSG_RESULT($interp)
52-
PYTHON_FOR_BUILD="_PROJECT_BASE=$srcdir"' _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(srcdir)/Lib:$(srcdir)/Lib/plat-$(MACHDEP) '$interp
52+
PYTHON_FOR_BUILD="_PYTHON_PROJECT_BASE=$srcdir"' _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(srcdir)/Lib:$(srcdir)/Lib/plat-$(MACHDEP) '$interp
5353
fi
5454
else
5555
PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'

0 commit comments

Comments
 (0)