summaryrefslogtreecommitdiff
path: root/Lib/distutils/util.py
diff options
context:
space:
mode:
authordoko@python.org <doko@python.org>2013-01-31 23:52:03 +0100
committerdoko@python.org <doko@python.org>2013-01-31 23:52:03 +0100
commitd65e2bab3b438f883ef28245f51795b14a4c498f (patch)
treef9a237fb2be7cf175a68940f4210407842f0468a /Lib/distutils/util.py
parentc5200b489de125088fdc445b5f5c97d7fb98cead (diff)
downloadcpython-git-d65e2bab3b438f883ef28245f51795b14a4c498f.tar.gz
- Issue #17086: Backport the patches from the 3.3 branch to cross-build
the package.
Diffstat (limited to 'Lib/distutils/util.py')
-rw-r--r--Lib/distutils/util.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/distutils/util.py b/Lib/distutils/util.py
index 5279411294..ea6ed8a9ac 100644
--- a/Lib/distutils/util.py
+++ b/Lib/distutils/util.py
@@ -51,6 +51,10 @@ def get_platform ():
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.