On Mon, Feb 22, 2010 at 3:15 PM, Kris <[email protected]> wrote: > >> Well, the current "python setup.py install" and the packaged RPMs that >> are created using cx_Freeze put the binary and the library.zip and all >> of the associated extension files in <prefix>/lib/<name>-<version> >> where <name> and <version> are the values defined in the metadata in >> setup.py and <prefix> is /usr or /usr/local or wherever you specify on >> the command line. Then a symbolic link is created in <prefix>/bin >> pointing to the executable(s) found in the above named directory. That >> ensures that each package is independent but enables you to run it in >> the normal fashion without changing the PATH environment variable or >> anything like that. I believe this resolves all of your questions but >> I'd appreciate your comments. In any case it seems to work well for >> me. :-) > > Thank you Anthony. I better understand now how cx_freeze expects to have > its dependencies available.
You're welcome. > There is one more issue I want to bring to your attention. I suspect > cx_freeze does not collect all .so dependencies. > > I followed the approach you recommended to produce a build directory > with the binaries and the .so files, but running the binaries from that > directory in a different machine does not work. For example, it reports > that (for my particular application) libffi.so.5 is missing. This is a > library that was needed to compile one of the python libraries needed by > my application. Well, there is one more thing you need to understand about how cx_Freeze handles the collection of binary dependencies. :-) It uses ldd to determine the list of shared objects that the extension module requires, then filters them out by their location. Shared objects found in /usr/lib and /lib are normally excluded. You can turn this off but doing so would require that everything and the kitchen sink be included -- likely not what you want. If there are things that are found in /usr/lib or /lib that you want included, you will have to use setup.py to tell cx_Freeze you want them included. I cannot tell which shared objects you want and which ones you don't want, after all! :-) > What is the best way to handle this ? Should I manually copy in the > distributed directory such libraries, or is this something cx_freeze > should be handling ? Use setup.py and the option bin_includes to specify the names of the shared objects you want to include no matter where they are found. Anthony ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ cx-freeze-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/cx-freeze-users
