Hello guys,

from Leopard on, the special name @executable_path cannot be used 
anymore in library paths for runtime substitution; two new special names 
(@rpath and @library_path) were introduced for similar purposes.

PyInstaller currently uses @executable_path to do its magic: it should 
continue to do so if running under Mac OS X < 10.5, and switch to @rpath 
if running under >= 10.5.

I'm attaching a simple patch that implements the aforementioned 
behaviour.  Comments?

-- 
Lorenzo Mancini

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/PyInstaller?hl=en
-~----------~----~----~----~------~----~------~--~---

Index: deploy/tools/PyInstaller/bindepend.py
===================================================================
--- deploy/tools/PyInstaller/bindepend.py       (revision 21222)
+++ deploy/tools/PyInstaller/bindepend.py       (working copy)
@@ -393,8 +393,17 @@
     return _bpath
 
 def fixOsxPaths(moduleName):
+    import platform
+    ver = platform.mac_ver()[0]
+    if ver >= '10.5.0':
+        # @executable_path is superseded from Leopard on
+        # 
http://www.codeshorts.ca/2007/nov/01/leopard-linking-making-relocatable-libraries-movin
+        prefix = "@rpath"
+    else:
+        prefix = "@executable_path"
+
     for name, lib in selectImports(moduleName):
-        dest = os.path.join("@executable_path", name)
+        dest = os.path.join(prefix, name)
         cmd = "install_name_tool -change %s %s %s" % (lib, dest, moduleName)
         os.system(cmd)
 

Reply via email to