From: Michael T. <mic...@gm...> - 2005-04-12 12:53:35
|
Well, after looking at the examples you'll be pleased to hear they cleared up a fundamental misunderstanding I had with py2exe's configuration. You won't be so pleased to hear that they blew up dramatically and in an interesting new way (for me) when I tried to run the frozen exes :) I had been mixing up distutils' packages directive (which lists packages in your source tree) and py2exe's 'packages' option (which does what my lengthy includes do in one go with the package). Using the packages directive leads to errors, 'packages' does what I expected. So you can pretty much ignore my includes, though I think my comments about hand holding py2exe's module finding still stand. Now, on to the problem: C:\temp\py2exe\simple_plot_gtk\dist>date_demo.exe Fatal Python error: Call to API function without first calling import_libnumarra y() in Src\_convmodule.c This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information. If I add numarray to the packages list it works fine for me. (I also had to copy in the lib and etc directories from my GTK install to keep GTK+ happy, since it needs supporting files and libraries, that's a pygtk/GTK+ specific thing.) Even when I remove the pytz imports from the simple_plot_gtk scripts py2exe doesn't seem to have any problems, the pytz package include does the trick for me. I've attached a diff showing the minor modifications I made. The complete set of commands I used to build (under cygwin with official python, not the cygwin python): $ python.exe setup.py py2exe $ cp -r /c/GTK/etc dist $ cp -r /c/GTK/lib dist $ ./dist/date_demo.exe cheers, Michael |