Generating Executable
This article describes some problems regarding the executable generation and their solution.
py2exe stops after the line "Copying (...)run_w.exe -> (...)main.exe"
One of the possible problems is the icon file. In our case, we found out that the icon configured in "setup.py" wasn't a "ico" file, but a "png". Py2exe does not handle that very well and gives a GPF.
RuntimeError: the sip module has already registered a module called Qwt5.Qwt
This error occurs only on py2exe 0.6.6. We fixed our version of py2exe, removing a "trick" that caused this error. The fixed revision is "1929".




py2exe 0.6.6 is having problems:
ImportError: No module named numpy.core.multiarray
Traceback (most recent call last):
File "main.py", line 2, in
File "plugins10\plugins\license\__init__.pyc", line 1, in
File "plugins10\plugins\license\licenseplugins.pyc", line 1, in
File "plugins10\plugins\uiapplication\__init__.pyc", line 2, in
File "plugins10\plugins\uiapplication\uiapplication.pyc", line 16, in
File "plugins10\plugins\uiapplication\defaultsplashscreen.pyc", line 3, in
File "xgui20\qt_traits\__init__.pyc", line 1, in
File "xgui20\qt_traits\qt4_traits\__init__.pyc", line 27, in
File "xgui20\qt_traits\qt4_traits\qt4_plot.pyc", line 1, in
File "Qwt5\__init__.pyc", line 23, in
File "Qwt5\Qwt.pyc", line 12, in
File "Qwt5\Qwt.pyc", line 10, in __load
RuntimeError: the sip module has already registered a module called Qwt5.Qwt
py2exe 0.6.5 works, but it has to be compiled for python 2.5, and the boot_common.py must have a different 'fake_getline' (additional parameter: module_globals=None).
People, this problem does not seem to have been solved. In Banshee we get the same error (py2exe-0.6.6 at revision 1957).
I ended up moving the import that was causing the problem to the function that used the name it was importing, and everything seems to be work.
This issue has been registered in Mantis 8550 along with a test that reproduces the problem.