diff options
author | Ronald Oussoren <ronaldoussoren@mac.com> | 2010-05-05 19:11:21 (GMT) |
---|---|---|
committer | Ronald Oussoren <ronaldoussoren@mac.com> | 2010-05-05 19:11:21 (GMT) |
commit | 94f25283c9b6cb43791e23618b9bec0cc961a7cb (patch) | |
tree | c32622183a1e7020de5afb458288be48449a60a6 /setup.py | |
parent | a045f191b4670bbf201d6d56a50886694c26da3e (diff) | |
download | cpython-94f25283c9b6cb43791e23618b9bec0cc961a7cb.zip cpython-94f25283c9b6cb43791e23618b9bec0cc961a7cb.tar.gz cpython-94f25283c9b6cb43791e23618b9bec0cc961a7cb.tar.bz2 |
Remove traces of MacOS9 support.
Fix for issue #7908
Diffstat (limited to 'setup.py')
-rw-r--r-- | setup.py | 81 |
1 files changed, 34 insertions, 47 deletions
@@ -150,22 +150,21 @@ class PyBuildExt(build_ext): if ext.name in sys.builtin_module_names: self.extensions.remove(ext) - if platform != 'mac': - # Parse Modules/Setup and Modules/Setup.local to figure out which - # modules are turned on in the file. - remove_modules = [] - for filename in ('Modules/Setup', 'Modules/Setup.local'): - input = text_file.TextFile(filename, join_lines=1) - while 1: - line = input.readline() - if not line: break - line = line.split() - remove_modules.append(line[0]) - input.close() - - for ext in self.extensions[:]: - if ext.name in remove_modules: - self.extensions.remove(ext) + # Parse Modules/Setup and Modules/Setup.local to figure out which + # modules are turned on in the file. + remove_modules = [] + for filename in ('Modules/Setup', 'Modules/Setup.local'): + input = text_file.TextFile(filename, join_lines=1) + while 1: + line = input.readline() + if not line: break + line = line.split() + remove_modules.append(line[0]) + input.close() + + for ext in self.extensions[:]: + if ext.name in remove_modules: + self.extensions.remove(ext) # When you run "make CC=altcc" or something similar, you really want # those environment variables passed into the setup.py phase. Here's @@ -381,7 +380,7 @@ class PyBuildExt(build_ext): # Check for MacOS X, which doesn't need libm.a at all math_libs = ['m'] - if platform in ['darwin', 'mac']: + if platform == 'darwin': math_libs = [] # XXX Omitted modules: gl, pure, dl, SGI-specific modules @@ -441,19 +440,16 @@ class PyBuildExt(build_ext): # fcntl(2) and ioctl(2) exts.append( Extension('fcntl', ['fcntlmodule.c']) ) - if platform not in ['mac']: - # pwd(3) - exts.append( Extension('pwd', ['pwdmodule.c']) ) - # grp(3) - exts.append( Extension('grp', ['grpmodule.c']) ) - # spwd, shadow passwords - if (config_h_vars.get('HAVE_GETSPNAM', False) or - config_h_vars.get('HAVE_GETSPENT', False)): - exts.append( Extension('spwd', ['spwdmodule.c']) ) - else: - missing.append('spwd') + # pwd(3) + exts.append( Extension('pwd', ['pwdmodule.c']) ) + # grp(3) + exts.append( Extension('grp', ['grpmodule.c']) ) + # spwd, shadow passwords + if (config_h_vars.get('HAVE_GETSPNAM', False) or + config_h_vars.get('HAVE_GETSPENT', False)): + exts.append( Extension('spwd', ['spwdmodule.c']) ) else: - missing.extend(['pwd', 'grp', 'spwd']) + missing.append('spwd') # select(2); not on ancient System V exts.append( Extension('select', ['selectmodule.c']) ) @@ -462,17 +458,11 @@ class PyBuildExt(build_ext): exts.append( Extension('parser', ['parsermodule.c']) ) # Memory-mapped files (also works on Win32). - if platform not in ['mac']: - exts.append( Extension('mmap', ['mmapmodule.c']) ) - else: - missing.append('mmap') + exts.append( Extension('mmap', ['mmapmodule.c']) ) # Lance Ellinghaus's syslog module - if platform not in ['mac']: - # syslog daemon interface - exts.append( Extension('syslog', ['syslogmodule.c']) ) - else: - missing.append('syslog') + # syslog daemon interface + exts.append( Extension('syslog', ['syslogmodule.c']) ) # # Here ends the simple stuff. From here on, modules need certain @@ -532,16 +522,13 @@ class PyBuildExt(build_ext): else: missing.append('readline') - if platform not in ['mac']: - # crypt module. + # crypt module. - if self.compiler_obj.find_library_file(lib_dirs, 'crypt'): - libs = ['crypt'] - else: - libs = [] - exts.append( Extension('crypt', ['cryptmodule.c'], libraries=libs) ) + if self.compiler_obj.find_library_file(lib_dirs, 'crypt'): + libs = ['crypt'] else: - missing.append('crypt') + libs = [] + exts.append( Extension('crypt', ['cryptmodule.c'], libraries=libs) ) # CSV files exts.append( Extension('_csv', ['_csv.c']) ) @@ -986,7 +973,7 @@ class PyBuildExt(build_ext): missing.append('_gdbm') # Unix-only modules - if platform not in ['mac', 'win32']: + if platform != 'win32': # Steen Lumholt's termios module exts.append( Extension('termios', ['termios.c']) ) # Jeremy Hylton's rlimit interface |