Browse Source

protect makepanda

David Rose 17 years ago
parent
commit
8b71199fdd
1 changed files with 4 additions and 1 deletions
  1. 4 1
      direct/src/extensions_native/extension_native_helpers.py

+ 4 - 1
direct/src/extensions_native/extension_native_helpers.py

@@ -23,7 +23,10 @@ if sys.platform == "win32":
 elif sys.platform == "darwin":
 elif sys.platform == "darwin":
     # On OSX, the dynamic libraries usually end in .dylib, but
     # On OSX, the dynamic libraries usually end in .dylib, but
     # sometimes we need .so.
     # sometimes we need .so.
-    from extensions_darwin import dll_ext
+    try:
+        from direct.extensions_native.extensions_darwin import dll_ext
+    except ImportError:
+        dll_ext = '.dylib'
 else:
 else:
     # On most other UNIX systems (including linux), .so is used.
     # On most other UNIX systems (including linux), .so is used.
     dll_ext = '.so'
     dll_ext = '.so'