summaryrefslogtreecommitdiffstats
path: root/Lib/distutils/util.py
diff options
context:
space:
mode:
authorAndrew M. Kuchling <amk@amk.ca>2003-01-06 13:28:12 (GMT)
committerAndrew M. Kuchling <amk@amk.ca>2003-01-06 13:28:12 (GMT)
commitb8c7b9f0ccb3073afba15bbcc68c1ada12a538bf (patch)
treed0945b56a6ffc07ef0f1afbee1b5b7b5f8ea794b /Lib/distutils/util.py
parent1772f176668dac4f1ad6aa425ecbc71a1fbcae73 (diff)
downloadcpython-b8c7b9f0ccb3073afba15bbcc68c1ada12a538bf.zip
cpython-b8c7b9f0ccb3073afba15bbcc68c1ada12a538bf.tar.gz
cpython-b8c7b9f0ccb3073afba15bbcc68c1ada12a538bf.tar.bz2
Translate spaces in the machine name to underscores
(Power Macintosh -> Power_Macintosh)
Diffstat (limited to 'Lib/distutils/util.py')
-rw-r--r--Lib/distutils/util.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/distutils/util.py b/Lib/distutils/util.py
index 17fc320..dc3183b 100644
--- a/Lib/distutils/util.py
+++ b/Lib/distutils/util.py
@@ -40,10 +40,11 @@ def get_platform ():
(osname, host, release, version, machine) = os.uname()
- # Convert the OS name to lowercase and remove '/' characters
- # (to accommodate BSD/OS)
+ # Convert the OS name to lowercase, remove '/' characters
+ # (to accommodate BSD/OS), and translate spaces (for "Power Macintosh")
osname = string.lower(osname)
osname = string.replace(osname, '/', '')
+ machine = string.replace(machine, ' ', '_')
if osname[:5] == "linux":
# At least on Linux/Intel, 'machine' is the processor --