summaryrefslogtreecommitdiff
path: root/unixccompiler.py
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>2001-08-27 15:08:16 +0000
committerJack Jansen <jack.jansen@cwi.nl>2001-08-27 15:08:16 +0000
commit679698bbb368dc2cee79992418c7720f2acce34a (patch)
treeda4d6eeaa904c72bf2f2ddcc6d8008e08e2bb5ed /unixccompiler.py
parentf5528a1e2f78f25f3208d3365f6b0ed3f5e7e74e (diff)
downloadpython-setuptools-git-679698bbb368dc2cee79992418c7720f2acce34a.tar.gz
Patch by Bill Noon: added 'dylib' as a library type along with
'static' and 'shared'. This fixes extension building for dynamic Pythons on MacOSX.
Diffstat (limited to 'unixccompiler.py')
-rw-r--r--unixccompiler.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/unixccompiler.py b/unixccompiler.py
index da1f2a4e..a4f0ac4d 100644
--- a/unixccompiler.py
+++ b/unixccompiler.py
@@ -71,7 +71,8 @@ class UnixCCompiler (CCompiler):
obj_extension = ".o"
static_lib_extension = ".a"
shared_lib_extension = ".so"
- static_lib_format = shared_lib_format = "lib%s%s"
+ dylib_lib_extension = ".dylib"
+ static_lib_format = shared_lib_format = dylib_lib_format = "lib%s%s"
@@ -259,6 +260,8 @@ class UnixCCompiler (CCompiler):
for dir in dirs:
shared = os.path.join(
dir, self.library_filename(lib, lib_type='shared'))
+ dylib = os.path.join(
+ dir, self.library_filename(lib, lib_type='dylib'))
static = os.path.join(
dir, self.library_filename(lib, lib_type='static'))
@@ -266,7 +269,9 @@ class UnixCCompiler (CCompiler):
# data to go on: GCC seems to prefer the shared library, so I'm
# assuming that *all* Unix C compilers do. And of course I'm
# ignoring even GCC's "-static" option. So sue me.
- if os.path.exists(shared):
+ if os.path.exists(dylib):
+ return dylib
+ elif os.path.exists(shared):
return shared
elif os.path.exists(static):
return static