mirror of https://github.com/python/cpython
Remove traces of Mac OS 9 support, again (#9508).
This was done in r80805 (#7908) and erroneously brought back by the distutils revert. This commit removes more code than the original, which was uncomplete. There is no NEWS entry, like in r80805.
This commit is contained in:
parent
2642ad07ee
commit
45ee43be43
|
@ -60,14 +60,6 @@ INSTALL_SCHEMES = {
|
|||
'data' : '$base',
|
||||
},
|
||||
'nt': WINDOWS_SCHEME,
|
||||
'mac': {
|
||||
'purelib': '$base/Lib/site-packages',
|
||||
'platlib': '$base/Lib/site-packages',
|
||||
'headers': '$base/Include/$dist_name',
|
||||
'scripts': '$base/Scripts',
|
||||
'data' : '$base',
|
||||
},
|
||||
|
||||
'os2': {
|
||||
'purelib': '$base/Lib/site-packages',
|
||||
'platlib': '$base/Lib/site-packages',
|
||||
|
@ -95,14 +87,6 @@ if HAS_USER_SITE:
|
|||
'data' : '$userbase',
|
||||
}
|
||||
|
||||
INSTALL_SCHEMES['mac_user'] = {
|
||||
'purelib': '$usersite',
|
||||
'platlib': '$usersite',
|
||||
'headers': '$userbase/$py_version_short/include/$dist_name',
|
||||
'scripts': '$userbase/bin',
|
||||
'data' : '$userbase',
|
||||
}
|
||||
|
||||
INSTALL_SCHEMES['os2_home'] = {
|
||||
'purelib': '$usersite',
|
||||
'platlib': '$usersite',
|
||||
|
|
|
@ -130,15 +130,6 @@ def copy_file(src, dst, preserve_mode=1, preserve_times=1, update=0,
|
|||
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 as exc:
|
||||
raise DistutilsFileError(
|
||||
"could not copy '%s' to '%s': %s" % (src, dst, exc.args[-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':
|
||||
|
|
|
@ -86,11 +86,6 @@ def get_python_inc(plat_specific=0, prefix=None):
|
|||
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:
|
||||
|
@ -131,17 +126,6 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None):
|
|||
return prefix
|
||||
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")
|
||||
|
@ -477,32 +461,6 @@ def _init_nt():
|
|||
_config_vars = g
|
||||
|
||||
|
||||
def _init_mac():
|
||||
"""Initialize the module as appropriate for Macintosh systems"""
|
||||
g = {}
|
||||
# set basic install directories
|
||||
g['LIBDEST'] = get_python_lib(plat_specific=0, standard_lib=1)
|
||||
g['BINLIBDEST'] = get_python_lib(plat_specific=1, standard_lib=1)
|
||||
|
||||
# XXX hmmm.. a normal install puts include files here
|
||||
g['INCLUDEPY'] = get_python_inc(plat_specific=0)
|
||||
|
||||
import MacOS
|
||||
if not hasattr(MacOS, 'runtimemodel'):
|
||||
g['SO'] = '.ppc.slb'
|
||||
else:
|
||||
g['SO'] = '.%s.slb' % MacOS.runtimemodel
|
||||
|
||||
# XXX are these used anywhere?
|
||||
g['install_lib'] = os.path.join(EXEC_PREFIX, "Lib")
|
||||
g['install_platlib'] = os.path.join(EXEC_PREFIX, "Mac", "Lib")
|
||||
|
||||
# These are used by the extension module build
|
||||
g['srcdir'] = ':'
|
||||
global _config_vars
|
||||
_config_vars = g
|
||||
|
||||
|
||||
def _init_os2():
|
||||
"""Initialize the module as appropriate for OS/2"""
|
||||
g = {}
|
||||
|
|
|
@ -235,15 +235,6 @@ def change_root (new_root, pathname):
|
|||
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 = pathname.split(":", 1)
|
||||
pathname = ":" + elements[1]
|
||||
return os.path.join(new_root, pathname)
|
||||
|
||||
else:
|
||||
raise DistutilsPlatformError("nothing known about platform '%s'" % os.name)
|
||||
|
||||
|
|
Loading…
Reference in New Issue