summaryrefslogtreecommitdiffstats
path: root/setup.py
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2002-06-11 06:22:31 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2002-06-11 06:22:31 (GMT)
commitf90ae20354ceb501f0ba0b6459df17f1a8005a47 (patch)
treef9aae742cfa33ba10af2ed8152aff802430f626c /setup.py
parent7981ce576c719e291dc901a3463e725b6be3c50e (diff)
downloadcpython-f90ae20354ceb501f0ba0b6459df17f1a8005a47.zip
cpython-f90ae20354ceb501f0ba0b6459df17f1a8005a47.tar.gz
cpython-f90ae20354ceb501f0ba0b6459df17f1a8005a47.tar.bz2
Patch #488073: AtheOS port.
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py19
1 files changed, 15 insertions, 4 deletions
diff --git a/setup.py b/setup.py
index 929f2e6..dcca200 100644
--- a/setup.py
+++ b/setup.py
@@ -214,6 +214,8 @@ class PyBuildExt(build_ext):
platform = 'beos'
elif platform[:6] == 'darwin':
platform = 'darwin'
+ elif platform[:6] == 'atheos':
+ platform = 'atheos'
return platform
@@ -242,6 +244,13 @@ class PyBuildExt(build_ext):
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 @@ class PyBuildExt(build_ext):
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 @@ class PyBuildExt(build_ext):
# 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 @@ class PyBuildExt(build_ext):
# 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