mirror of
https://github.com/python/cpython.git
synced 2025-11-25 04:34:37 +00:00
- Issue #14330: For cross builds, don't use host python, use host search paths
for host compiler.
This commit is contained in:
parent
b457b9be4d
commit
1abe1c5fe1
6 changed files with 200 additions and 27 deletions
|
|
@ -138,6 +138,10 @@ if os.name == "nt" and "\\pc\\v" in _PROJECT_BASE[-10:].lower():
|
|||
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"])
|
||||
|
||||
def _is_python_source_dir(d):
|
||||
for fn in ("Setup.dist", "Setup.local"):
|
||||
if os.path.isfile(os.path.join(d, "Modules", fn)):
|
||||
|
|
@ -673,6 +677,10 @@ def get_platform():
|
|||
# Mac OS is M68k or PPC, etc.
|
||||
return sys.platform
|
||||
|
||||
# Set for cross builds explicitly
|
||||
if "_PYTHON_HOST_PLATFORM" in os.environ:
|
||||
return os.environ["_PYTHON_HOST_PLATFORM"]
|
||||
|
||||
# Try to distinguish various flavours of Unix
|
||||
osname, host, release, version, machine = os.uname()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue