diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2002-06-11 06:22:31 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2002-06-11 06:22:31 (GMT) |
commit | f90ae20354ceb501f0ba0b6459df17f1a8005a47 (patch) | |
tree | f9aae742cfa33ba10af2ed8152aff802430f626c /Lib/distutils | |
parent | 7981ce576c719e291dc901a3463e725b6be3c50e (diff) | |
download | cpython-f90ae20354ceb501f0ba0b6459df17f1a8005a47.zip cpython-f90ae20354ceb501f0ba0b6459df17f1a8005a47.tar.gz cpython-f90ae20354ceb501f0ba0b6459df17f1a8005a47.tar.bz2 |
Patch #488073: AtheOS port.
Diffstat (limited to 'Lib/distutils')
-rw-r--r-- | Lib/distutils/command/build_ext.py | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/Lib/distutils/command/build_ext.py b/Lib/distutils/command/build_ext.py index 89ca1dc..d8f3dc8 100644 --- a/Lib/distutils/command/build_ext.py +++ b/Lib/distutils/command/build_ext.py @@ -178,9 +178,9 @@ class build_ext (Command): if os.name == 'os2': self.library_dirs.append(os.path.join(sys.exec_prefix, 'Config')) - # for extensions under Cygwin Python's library directory must be + # for extensions under Cygwin and AtheOS Python's library directory must be # appended to library_dirs - if sys.platform[:6] == 'cygwin': + if sys.platform[:6] == 'cygwin' or sys.platform[:6] == 'atheos': if string.find(sys.executable, sys.exec_prefix) != -1: # building third party extensions self.library_dirs.append(os.path.join(sys.prefix, "lib", @@ -656,6 +656,22 @@ class build_ext (Command): # don't extend ext.libraries, it may be shared with other # extensions, it is a reference to the original list return ext.libraries + [pythonlib] + elif sys.platform[:6] == "atheos": + from distutils import sysconfig + + template = "python%d.%d" + pythonlib = (template % + (sys.hexversion >> 24, (sys.hexversion >> 16) & 0xff)) + # Get SHLIBS from Makefile + extra = [] + for lib in sysconfig.get_config_var('SHLIBS').split(): + if lib.startswith('-l'): + extra.append(lib[2:]) + else: + extra.append(lib) + # don't extend ext.libraries, it may be shared with other + # extensions, it is a reference to the original list + return ext.libraries + [pythonlib, "m"] + extra else: return ext.libraries |