distributing a app frozen by cx_freeze

Serge Orlov Serge.Orlov at gmail.com
Sat May 13 22:33:52 EDT 2006


Flavio wrote:
> Well I managed to get rid of the undefined symbol message by copying
> all qt libs to the freeze directory, the problem is that now the
> package is huge (83MB)!
>
> So my question is: is there a way to find out exactly which lib is
> missing ?

I haven't done that myself, but I've had an idea of discovering
dependances for dynamic languages: run your test suite and register
which files are loaded (byte code, dlls, datafiles), then remove from
the list all files your know they were used only for testing, that's
it, now you know all the files that you need to run your application.

On linux you can find you which .so files are loaded by looking at file
/proc/self/maps at the end of running your test suite. To find out
which python bytecode files were loaded you can use -v option of
python, it will print all files that were loaded to stderr, to separate
its output from other stderr stuff, you can redirect sys.stderr to some
other file.

After you've done all that work, I'm not sure if you need cx_freeze.
You just need to write little startup script that will set
LD_LIBRARY_PATH, PYTHONPATH and start your main script.




More information about the Python-list mailing list