switchable extensions_native_helpers.py

This commit is contained in:
David Rose 2008-10-20 20:35:47 +00:00
parent efe655aea0
commit d3b4f33c89
2 changed files with 23 additions and 2 deletions

View File

@ -0,0 +1,20 @@
#if $[OSX_PLATFORM]
#output extensions_darwin.py
#### Generated automatically by $[PPREMAKE] $[PPREMAKE_VERSION] from $[notdir $[THISFILENAME]].
################################# DO NOT EDIT ###########################
# This defines the shared-library filename extension that is built and
# imported on OSX. It's normally .dylib, but in certain Python and
# OSX versions (for instance, Python 2.4 on OSX 10.4), it appears that
# we need to generate and import .so files instead, since Python won't
# import the .dylibs directly. This is controlled via the BUNDLE_EXT
# variable defined in Config.pp.
#if $[BUNDLE_EXT]
dll_ext = "$[BUNDLE_EXT]"
#else
dll_ext = ".dylib"
#endif
#end extensions_darwin.py
#endif // OSX_PLATFORM

View File

@ -21,8 +21,9 @@ if sys.platform == "win32":
if sys.executable.endswith('_d.exe'):
dll_suffix = '_d'
elif sys.platform == "darwin":
# On OSX, the dynamic libraries usually end in .dylib.
dll_ext = '.dylib'
# On OSX, the dynamic libraries usually end in .dylib, but
# sometimes we need .so.
from extensions_darwin import dll_ext
else:
# On most other UNIX systems (including linux), .so is used.
dll_ext = '.so'