In a number of places code still revers
to "sys.platform == 'mac'" and that is
dead code because it refers to a platform
that is no longer supported (and hasn't been
supported for several releases).
Fixes issue #7908 for the trunk.
diff --git a/Lib/distutils/command/install.py b/Lib/distutils/command/install.py
index 44c7692..f1f3bd5 100644
--- a/Lib/distutils/command/install.py
+++ b/Lib/distutils/command/install.py
@@ -69,20 +69,6 @@
'scripts': '$userbase/Scripts',
'data' : '$userbase',
},
- 'mac': {
- 'purelib': '$base/Lib/site-packages',
- 'platlib': '$base/Lib/site-packages',
- 'headers': '$base/Include/$dist_name',
- 'scripts': '$base/Scripts',
- 'data' : '$base',
- },
- 'mac_user': {
- 'purelib': '$usersite',
- 'platlib': '$usersite',
- 'headers': '$userbase/$py_version_short/include/$dist_name',
- 'scripts': '$userbase/bin',
- 'data' : '$userbase',
- },
'os2': {
'purelib': '$base/Lib/site-packages',
'platlib': '$base/Lib/site-packages',
diff --git a/Lib/distutils/file_util.py b/Lib/distutils/file_util.py
index d8e8fd5..b3d9d54 100644
--- a/Lib/distutils/file_util.py
+++ b/Lib/distutils/file_util.py
@@ -133,18 +133,9 @@
if dry_run:
return (dst, 1)
- # On Mac OS, use the native file copy routine
- if os.name == 'mac':
- import macostools
- try:
- macostools.copy(src, dst, 0, preserve_times)
- except os.error, exc:
- raise DistutilsFileError(
- "could not copy '%s' to '%s': %s" % (src, dst, exc[-1]))
-
# If linking (hard or symbolic), use the appropriate system call
# (Unix only, of course, but that's the caller's responsibility)
- elif link == 'hard':
+ if link == 'hard':
if not (os.path.exists(dst) and os.path.samefile(src, dst)):
os.link(src, dst)
elif link == 'sym':
diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py
index bb53315..4d16b26 100644
--- a/Lib/distutils/sysconfig.py
+++ b/Lib/distutils/sysconfig.py
@@ -88,11 +88,6 @@
return os.path.join(prefix, "include", "python" + get_python_version())
elif os.name == "nt":
return os.path.join(prefix, "include")
- elif os.name == "mac":
- if plat_specific:
- return os.path.join(prefix, "Mac", "Include")
- else:
- return os.path.join(prefix, "Include")
elif os.name == "os2":
return os.path.join(prefix, "Include")
else:
@@ -135,18 +130,6 @@
else:
return os.path.join(prefix, "Lib", "site-packages")
- elif os.name == "mac":
- if plat_specific:
- if standard_lib:
- return os.path.join(prefix, "Lib", "lib-dynload")
- else:
- return os.path.join(prefix, "Lib", "site-packages")
- else:
- if standard_lib:
- return os.path.join(prefix, "Lib")
- else:
- return os.path.join(prefix, "Lib", "site-packages")
-
elif os.name == "os2":
if standard_lib:
return os.path.join(prefix, "Lib")
diff --git a/Lib/distutils/util.py b/Lib/distutils/util.py
index 994dd21..b3ec6e9 100644
--- a/Lib/distutils/util.py
+++ b/Lib/distutils/util.py
@@ -235,15 +235,6 @@
path = path[1:]
return os.path.join(new_root, path)
- elif os.name == 'mac':
- 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, \
"nothing known about platform '%s'" % os.name