summaryrefslogtreecommitdiff
path: root/scipy/distutils/misc_util.py
diff options
context:
space:
mode:
authorPearu Peterson <pearu.peterson@gmail.com>2005-12-09 12:51:25 +0000
committerPearu Peterson <pearu.peterson@gmail.com>2005-12-09 12:51:25 +0000
commitb7fd6b53a0f8d94a891a56ce55d58bfda8ad74a8 (patch)
treeedb16cc007ef31ec9eeb511151546919825690d3 /scipy/distutils/misc_util.py
parentc47edab75891f9ebd2bc0bd17a94b619354aea82 (diff)
downloadnumpy-b7fd6b53a0f8d94a891a56ce55d58bfda8ad74a8.tar.gz
Fixing appendpath tests fow Windows. 2nd try.
Diffstat (limited to 'scipy/distutils/misc_util.py')
-rw-r--r--scipy/distutils/misc_util.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/scipy/distutils/misc_util.py b/scipy/distutils/misc_util.py
index 190a5bb49..36c1f60ad 100644
--- a/scipy/distutils/misc_util.py
+++ b/scipy/distutils/misc_util.py
@@ -896,8 +896,11 @@ def dict_append(d,**kws):
d[k] = v
def appendpath(prefix,path):
+ drive = ''
if os.path.isabs(path):
- absprefix = os.path.abspath(prefix)
+ drive = os.path.splitdrive(prefix)[0]
+ absprefix = os.path.splitdrive(os.path.abspath(prefix))[1]
+ pathdrive,path = os.path.splitdrive(path)
d = os.path.commonprefix([absprefix,path])
if os.path.join(absprefix[:len(d)],absprefix[len(d):])!=absprefix \
or os.path.join(path[:len(d)],path[len(d):])!=path:
@@ -908,7 +911,7 @@ def appendpath(prefix,path):
subpath = subpath[1:]
else:
subpath = path
- return os.path.normpath(os.path.join(prefix, subpath))
+ return os.path.normpath(os.path.join(drive + prefix, subpath))
def generate_config_py(extension, build_dir):
""" Generate <package>/config.py file containing system_info