Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(157869)

Unified Diff: Lib/sysconfig.py

Issue 17086: backport cross-build patches to the 2.7 branch
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Lib/plat-generic/regen ('k') | Makefile.pre.in » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
--- a/Lib/sysconfig.py Tue Jan 29 22:59:02 2013 +0000
+++ b/Lib/sysconfig.py Thu Jan 31 00:03:23 2013 +0100
@@ -116,6 +116,10 @@
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 "_PYTHON_PROJECT_BASE" in os.environ:
+ # the build directory for posix builds
+ _PROJECT_BASE = os.path.normpath(os.path.abspath("."))
def is_python_build():
for fn in ("Setup.dist", "Setup.local"):
if os.path.isfile(os.path.join(_PROJECT_BASE, "Modules", fn)):
@@ -560,6 +564,10 @@
return 'win-ia64'
return sys.platform
+ # Set for cross builds explicitly
+ if "_PYTHON_HOST_PLATFORM" in os.environ:
+ return os.environ["_PYTHON_HOST_PLATFORM"]
+
if os.name != "posix" or not hasattr(os, 'uname'):
# XXX what about the architecture? NT is Intel or Alpha,
# Mac OS is M68k or PPC, etc.
« no previous file with comments | « Lib/plat-generic/regen ('k') | Makefile.pre.in » ('j') | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+