summaryrefslogtreecommitdiffstats
path: root/Lib/distutils/util.py
diff options
context:
space:
mode:
authorGreg Ward <gward@python.net>2000-09-21 01:23:35 (GMT)
committerGreg Ward <gward@python.net>2000-09-21 01:23:35 (GMT)
commitf5855746fe0851e5a80b32061cb819021285ff25 (patch)
tree0a36c1e8e944fb034afca74e6a93dd819d4a2548 /Lib/distutils/util.py
parent55a8338d7fed65d3e0bdcf9c68f65bcbeb06ba50 (diff)
downloadcpython-f5855746fe0851e5a80b32061cb819021285ff25.zip
cpython-f5855746fe0851e5a80b32061cb819021285ff25.tar.gz
cpython-f5855746fe0851e5a80b32061cb819021285ff25.tar.bz2
Corran Webster: fix 'change_root()' to handle Mac OS paths.
Diffstat (limited to 'Lib/distutils/util.py')
-rw-r--r--Lib/distutils/util.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/Lib/distutils/util.py b/Lib/distutils/util.py
index 4688871..b60e39c 100644
--- a/Lib/distutils/util.py
+++ b/Lib/distutils/util.py
@@ -100,7 +100,13 @@ def change_root (new_root, pathname):
return os.path.join (new_root, path)
elif os.name == 'mac':
- raise RuntimeError, "no clue how to do this on Mac OS"
+ if not os.path.isabs(pathname):
+ return os.path.join(new_root, pathname)
+ else:
+ # Chop off volume name from start of path
+ elements = string.split(pathname, ":", 1)
+ pathname = ":" + elements[1]
+ return os.path.join(new_root, pathname)
else:
raise DistutilsPlatformError, \