From 4e4822490753f67ba5d4ab589e46eeb94fe14d9e Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Wed, 26 Feb 2003 22:26:03 +0000 Subject: [PATCH] Backport rev. 1.73: Translate spaces in the machine name to underscores --- Lib/distutils/util.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Lib/distutils/util.py b/Lib/distutils/util.py index abc91391e415..4792dae0d25b 100644 --- a/Lib/distutils/util.py +++ b/Lib/distutils/util.py @@ -42,10 +42,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 -- -- 2.47.3