After some further reflection, I'm going to say that this is would be classified as "not a bug" in pyinstaller. I can cause the same malfunction, running unfrozen, if I run the script while the current working directory is not the same as the script (really, not the same as where the .so is located).
So I think the correct way to handle this is to provide the full path to ctypes.CDLL(). In the case of being frozen, this just means to query sys.argv[0] to get the path to where the executable is, so long as the .so is packaged in that same dir. I was getting away with some bad behavior, because previous versions of pyinstaller set LD_LIBRARY_PATH, so the .so was being found anyway. On Wed, May 8, 2013 at 6:07 PM, Martin Zibricky <[email protected]>wrote: > Daniel Hyams píše v Út 07. 05. 2013 v 12:30 -0400: > > With the latest (develop) version of PyInstaller, I suddenly started > > having problems loading a shared library via ctypes, meaning: > > > > my_dll = ctypes.CDLL('thelib.so') > > how should it work? > > Does it work when you set LD_LIB_PATH in your code? > > Could you try to use the @executable, @rpath or @loader_path? > > -- > You received this message because you are subscribed to the Google Groups > "PyInstaller" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/pyinstaller?hl=en. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- Daniel Hyams [email protected] -- You received this message because you are subscribed to the Google Groups "PyInstaller" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/pyinstaller?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
