cpython: 2ec4ab2a6f65 (original) (raw)
Mercurial > cpython
changeset 74482:2ec4ab2a6f65 2.7
Emergency fix for #13803 bootstrap issue: Under Solaris, distutils doesn't include bitness in the directory name [#13803]
Jesus Cea jcea@jcea.es | |
---|---|
date | Wed, 18 Jan 2012 04:25:28 +0100 |
parents | 284550d0d8ae |
children | 4074439c3894 |
files | Lib/distutils/util.py |
diffstat | 1 files changed, 6 insertions(+), 2 deletions(-)[+] [-] Lib/distutils/util.py 8 |
line wrap: on
line diff
--- a/Lib/distutils/util.py +++ b/Lib/distutils/util.py @@ -6,7 +6,7 @@ one of the other *util.py modules. revision = "$Id$" -import sys, os, string, re, platform +import sys, os, string, re from distutils.errors import DistutilsPlatformError from distutils.dep_util import newer from distutils.spawn import spawn @@ -76,7 +76,11 @@ def get_platform (): if release[0] >= "5": # SunOS 5 == Solaris 2 osname = "solaris" release = "%d.%s" % (int(release[0]) - 3, release[2:])
machine += ".%s" % platform.architecture()[0][](#l1.16)
# We can't use "platform.architecture()[0]" because a[](#l1.17)
# bootstrap problem. We use a dict to get an error[](#l1.18)
# if some suspicious happens.[](#l1.19)
bitness = {2147483647:"32bit", 9223372036854775807:"64bit"}[](#l1.20)
elif osname[:4] == "irix": # could be "irix64"machine += ".%s" % bitness[sys.maxint][](#l1.21) # fall through to standard osname-release-machine representation[](#l1.22)
return "%s-%s" % (osname, release)