summaryrefslogtreecommitdiffstats
path: root/setup.py
diff options
context:
space:
mode:
authorRonald Oussoren <ronaldoussoren@mac.com>2010-05-05 19:09:31 (GMT)
committerRonald Oussoren <ronaldoussoren@mac.com>2010-05-05 19:09:31 (GMT)
commit9545a23c7ffb35417d451d24cc3b0339627965a7 (patch)
tree5e22fd30c1c6936970b4d87ca3e91f8428c74983 /setup.py
parenta8157183b89c08cf47c969185d40973ec21a81c5 (diff)
downloadcpython-9545a23c7ffb35417d451d24cc3b0339627965a7.zip
cpython-9545a23c7ffb35417d451d24cc3b0339627965a7.tar.gz
cpython-9545a23c7ffb35417d451d24cc3b0339627965a7.tar.bz2
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.
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py80
1 files changed, 35 insertions, 45 deletions
diff --git a/setup.py b/setup.py
index 08e819e..7d6cada 100644
--- a/setup.py
+++ b/setup.py
@@ -127,7 +127,7 @@ class PyBuildExt(build_ext):
# Platform-dependent module source and include directories
incdirlist = []
platform = self.get_platform()
- if platform in ('darwin', 'mac') and ("--disable-toolbox-glue" not in
+ if platform == 'darwin' and ("--disable-toolbox-glue" not in
sysconfig.get_config_var("CONFIG_ARGS")):
# Mac OS X also includes some mac-specific modules
macmoddir = os.path.join(srcdir, 'Mac/Modules')
@@ -160,22 +160,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
@@ -397,7 +396,7 @@ class PyBuildExt(build_ext):
# Check for MacOS X, which doesn't need libm.a at all
math_libs = ['m']
- if platform in ['darwin', 'beos', 'mac']:
+ if platform in ['darwin', 'beos']:
math_libs = []
# XXX Omitted modules: gl, pure, dl, SGI-specific modules
@@ -485,19 +484,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']) )
@@ -510,17 +506,14 @@ class PyBuildExt(build_ext):
exts.append( Extension('cPickle', ['cPickle.c']) )
# Memory-mapped files (also works on Win32).
- if platform not in ['atheos', 'mac']:
+ if platform not in ['atheos']:
exts.append( Extension('mmap', ['mmapmodule.c']) )
else:
missing.append('mmap')
# 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']) )
# George Neville-Neil's timing module:
# Deprecated in PEP 4 http://www.python.org/peps/pep-0004.html
@@ -592,16 +585,13 @@ class PyBuildExt(build_ext):
else:
missing.append('readline')
- if platform not in ['mac']:
- # crypt module.
+ # crypt module.
- if self.compiler.find_library_file(lib_dirs, 'crypt'):
- libs = ['crypt']
- else:
- libs = []
- exts.append( Extension('crypt', ['cryptmodule.c'], libraries=libs) )
+ if self.compiler.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']) )
@@ -1093,7 +1083,7 @@ class PyBuildExt(build_ext):
missing.append('gdbm')
# Unix-only modules
- if platform not in ['mac', 'win32']:
+ if platform not in ['win32']:
# Steen Lumholt's termios module
exts.append( Extension('termios', ['termios.c']) )
# Jeremy Hylton's rlimit interface