Mercurial > cpython-lru_cache-weakref
diff setup.py @ 23777:bec1b942e0bc legacy-trunk
Patch #488073: AtheOS port.
| author | Martin v. Löwis <martin@v.loewis.de> |
|---|---|
| date | Tue, 11 Jun 2002 06:22:31 +0000 |
| parents | 5c5fff5de250 |
| children | e3e019bc4e1e |
line wrap: on
line diff
--- a/setup.py Tue Jun 11 04:45:34 2002 +0000 +++ b/setup.py Tue Jun 11 06:22:31 2002 +0000 @@ -214,6 +214,8 @@ platform = 'beos' elif platform[:6] == 'darwin': platform = 'darwin' + elif platform[:6] == 'atheos': + platform = 'atheos' return platform @@ -242,6 +244,13 @@ platform = self.get_platform() (srcdir,) = sysconfig.get_config_vars('srcdir') + # Check for AtheOS which has libraries in non-standard locations + if platform == 'atheos': + lib_dirs += ['/system/libs', '/atheos/autolnk/lib'] + lib_dirs += os.getenv('LIBRARY_PATH', '').split(os.pathsep) + inc_dirs += ['/system/include', '/atheos/autolnk/include'] + inc_dirs += os.getenv('C_INCLUDE_PATH', '').split(os.pathsep) + # Check for MacOS X, which doesn't need libm.a at all math_libs = ['m'] if platform in ['darwin', 'beos']: @@ -323,7 +332,8 @@ exts.append( Extension('cPickle', ['cPickle.c']) ) # Memory-mapped files (also works on Win32). - exts.append( Extension('mmap', ['mmapmodule.c']) ) + if platform not in ['atheos']: + exts.append( Extension('mmap', ['mmapmodule.c']) ) # Lance Ellinghaus's modules: # enigma-inspired encryption @@ -479,10 +489,11 @@ # Steen Lumholt's termios module exts.append( Extension('termios', ['termios.c']) ) # Jeremy Hylton's rlimit interface - exts.append( Extension('resource', ['resource.c']) ) + if platform not in ['atheos']: + exts.append( Extension('resource', ['resource.c']) ) # Sun yellow pages. Some systems have the functions in libc. - if platform not in ['cygwin']: + if platform not in ['cygwin', 'atheos']: if (self.compiler.find_library_file(lib_dirs, 'nsl')): libs = ['nsl'] else: @@ -593,7 +604,7 @@ # Dynamic loading module dl_inc = find_file('dlfcn.h', [], inc_dirs) - if dl_inc is not None: + if (dl_inc is not None) and (platform not in ['atheos']): exts.append( Extension('dl', ['dlmodule.c']) ) # Platform-specific libraries
