projects
/
python
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
55a8338
)
Corran Webster: fix 'change_root()' to handle Mac OS paths.
author
Greg Ward
<gward@python.net>
Thu, 21 Sep 2000 01:23:35 +0000
(
01:23
+0000)
committer
Greg Ward
<gward@python.net>
Thu, 21 Sep 2000 01:23:35 +0000
(
01:23
+0000)
Lib/distutils/util.py
patch
|
blob
|
history
diff --git
a/Lib/distutils/util.py
b/Lib/distutils/util.py
index 468887127fd4d9c7a198174204daa104eac647dc..b60e39c709353ccca26b49823c9c225eda1b2031 100644
(file)
--- 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, \