I tried to use either py2exe-0.6.9 and latest py2exe trunk source with MinGW build of python 2.7.3, but I found that py2exe memimporter cannot load other pyd modules (py2exe compiled with DEBUG=1, zlib.pyd and _memimporter.pyd are uncompressed, libpython2.7.dll is UPX compressed):
_LoadLibrary(KERNEL32.DLL, 00000000)
LoadLibraryA(KERNEL32.DLL) -> 7c800000
_LoadLibrary(ADVAPI32.dll, 00000000)
LoadLibraryA(ADVAPI32.dll) -> 77da0000
_LoadLibrary(msvcrt.dll, 00000000)
LoadLibraryA(msvcrt.dll) -> 77be0000
_LoadLibrary(SHELL32.DLL, 00000000)
LoadLibraryA(SHELL32.DLL) -> 7d590000
_LoadLibrary(USER32.dll, 00000000)
LoadLibraryA(USER32.dll) -> 77d10000
_AddMemoryModule(libpython2.7.dll, 002559c8) -> 003f3fa8[1]
_FindMemoryModule((null), 002559c8) -> libpython2.7.dll[1]
MyGetProcAddress(002559c8, 0040b228(Py_Initialize))
MyGetProcAddress(002559c8, 0040b228(Py_Initialize)) -> 6ceedd10
_FindMemoryModule((null), 002559c8) -> libpython2.7.dll[1]
MyGetProcAddress(002559c8, 0040b236(PyRun_SimpleString))
MyGetProcAddress(002559c8, 0040b236(PyRun_SimpleString)) -> 6ceee2c0
_FindMemoryModule((null), 002559c8) -> libpython2.7.dll[1]
MyGetProcAddress(002559c8, 0040b249(Py_Finalize))
MyGetProcAddress(002559c8, 0040b249(Py_Finalize)) -> 6ceed340
_FindMemoryModule((null), 002559c8) -> libpython2.7.dll[1]
MyGetProcAddress(002559c8, 0040b255(Py_GetPath))
MyGetProcAddress(002559c8, 0040b255(Py_GetPath)) -> 6cefbd80
_FindMemoryModule((null), 002559c8) -> libpython2.7.dll[1]
MyGetProcAddress(002559c8, 0040b260(Py_SetPythonHome))
MyGetProcAddress(002559c8, 0040b260(Py_SetPythonHome)) -> 6ceeb7d0
_FindMemoryModule((null), 002559c8) -> libpython2.7.dll[1]
MyGetProcAddress(002559c8, 0040b271(Py_SetProgramName))
MyGetProcAddress(002559c8, 0040b271(Py_SetProgramName)) -> 6ceeb770
_FindMemoryModule((null), 002559c8) -> libpython2.7.dll[1]
MyGetProcAddress(002559c8, 0040b284(PyMarshal_ReadObjectFromString))
MyGetProcAddress(002559c8, 0040b284(PyMarshal_ReadObjectFromString)) -> 6cee8130
_FindMemoryModule((null), 002559c8) -> libpython2.7.dll[1]
MyGetProcAddress(002559c8, 0040b2a3(PyObject_CallFunction))
MyGetProcAddress(002559c8, 0040b2a3(PyObject_CallFunction)) -> 6ce4ada0
_FindMemoryModule((null), 002559c8) -> libpython2.7.dll[1]
MyGetProcAddress(002559c8, 0040b2b9(PyString_AsStringAndSize))
MyGetProcAddress(002559c8, 0040b2b9(PyString_AsStringAndSize)) -> 6ce8ad70
_FindMemoryModule((null), 002559c8) -> libpython2.7.dll[1]
MyGetProcAddress(002559c8, 0040b2d2(PyString_AsString))
MyGetProcAddress(002559c8, 0040b2d2(PyString_AsString)) -> 6ce8ae60
_FindMemoryModule((null), 002559c8) -> libpython2.7.dll[1]
MyGetProcAddress(002559c8, 0040b2e4(PyArg_ParseTuple))
MyGetProcAddress(002559c8, 0040b2e4(PyArg_ParseTuple)) -> 6cee0a80
_FindMemoryModule((null), 002559c8) -> libpython2.7.dll[1]
MyGetProcAddress(002559c8, 0040b2f5(PyErr_Format))
MyGetProcAddress(002559c8, 0040b2f5(PyErr_Format)) -> 6cedd2d0
_FindMemoryModule((null), 002559c8) -> libpython2.7.dll[1]
MyGetProcAddress(002559c8, 0040b302(PyImport_ImportModule))
MyGetProcAddress(002559c8, 0040b302(PyImport_ImportModule)) -> 6cee5390
_FindMemoryModule((null), 002559c8) -> libpython2.7.dll[1]
MyGetProcAddress(002559c8, 0040b318(PyInt_FromLong))
MyGetProcAddress(002559c8, 0040b318(PyInt_FromLong)) -> 6ce6e800
_FindMemoryModule((null), 002559c8) -> libpython2.7.dll[1]
MyGetProcAddress(002559c8, 0040b327(PyInt_AsLong))
MyGetProcAddress(002559c8, 0040b327(PyInt_AsLong)) -> 6ce6f210
_FindMemoryModule((null), 002559c8) -> libpython2.7.dll[1]
MyGetProcAddress(002559c8, 0040b334(PyLong_FromVoidPtr))
MyGetProcAddress(002559c8, 0040b334(PyLong_FromVoidPtr)) -> 6ce78b50
_FindMemoryModule((null), 002559c8) -> libpython2.7.dll[1]
MyGetProcAddress(002559c8, 0040b347(Py_InitModule4))
MyGetProcAddress(002559c8, 0040b347(Py_InitModule4)) -> 6cee8b50
_FindMemoryModule((null), 002559c8) -> libpython2.7.dll[1]
MyGetProcAddress(002559c8, 0040b356(PyTuple_New))
MyGetProcAddress(002559c8, 0040b356(PyTuple_New)) -> 6ce93660
_FindMemoryModule((null), 002559c8) -> libpython2.7.dll[1]
MyGetProcAddress(002559c8, 0040b362(PyTuple_SetItem))
MyGetProcAddress(002559c8, 0040b362(PyTuple_SetItem)) -> 6ce93eb0
_FindMemoryModule((null), 002559c8) -> libpython2.7.dll[1]
MyGetProcAddress(002559c8, 0040b372(Py_IsInitialized))
MyGetProcAddress(002559c8, 0040b372(Py_IsInitialized)) -> 6ceeb760
_FindMemoryModule((null), 002559c8) -> libpython2.7.dll[1]
MyGetProcAddress(002559c8, 0040b383(PyObject_SetAttrString))
MyGetProcAddress(002559c8, 0040b383(PyObject_SetAttrString)) -> 6ce81e60
_FindMemoryModule((null), 002559c8) -> libpython2.7.dll[1]
MyGetProcAddress(002559c8, 0040b39a(PyCFunction_NewEx))
MyGetProcAddress(002559c8, 0040b39a(PyCFunction_NewEx)) -> 6ce80120
_FindMemoryModule((null), 002559c8) -> libpython2.7.dll[1]
MyGetProcAddress(002559c8, 0040b3ac(PyObject_GetAttrString))
MyGetProcAddress(002559c8, 0040b3ac(PyObject_GetAttrString)) -> 6ce81790
_FindMemoryModule((null), 002559c8) -> libpython2.7.dll[1]
MyGetProcAddress(002559c8, 0040b3c3(Py_BuildValue))
MyGetProcAddress(002559c8, 0040b3c3(Py_BuildValue)) -> 6cee8da0
_FindMemoryModule((null), 002559c8) -> libpython2.7.dll[1]
MyGetProcAddress(002559c8, 0040b3d1(PyObject_Call))
MyGetProcAddress(002559c8, 0040b3d1(PyObject_Call)) -> 6ce4ac70
_FindMemoryModule((null), 002559c8) -> libpython2.7.dll[1]
MyGetProcAddress(002559c8, 0040b3df(PySys_WriteStderr))
MyGetProcAddress(002559c8, 0040b3df(PySys_WriteStderr)) -> 6cef39a0
_FindMemoryModule((null), 002559c8) -> libpython2.7.dll[1]
MyGetProcAddress(002559c8, 0040b3f1(PyErr_Occurred))
MyGetProcAddress(002559c8, 0040b3f1(PyErr_Occurred)) -> 6cedc8b0
_FindMemoryModule((null), 002559c8) -> libpython2.7.dll[1]
MyGetProcAddress(002559c8, 0040b400(PyErr_Clear))
MyGetProcAddress(002559c8, 0040b400(PyErr_Clear)) -> 6cedcbd0
_FindMemoryModule((null), 002559c8) -> libpython2.7.dll[1]
MyGetProcAddress(002559c8, 0040b40c(PyObject_IsInstance))
MyGetProcAddress(002559c8, 0040b40c(PyObject_IsInstance)) -> 6ce4b550
_FindMemoryModule((null), 002559c8) -> libpython2.7.dll[1]
MyGetProcAddress(002559c8, 0040b420(PyInt_Type))
MyGetProcAddress(002559c8, 0040b420(PyInt_Type)) -> 6cf2cce0
_FindMemoryModule((null), 002559c8) -> libpython2.7.dll[1]
MyGetProcAddress(002559c8, 0040b42b(_Py_NoneStruct))
MyGetProcAddress(002559c8, 0040b42b(_Py_NoneStruct)) -> 6cf2ffb4
_FindMemoryModule((null), 002559c8) -> libpython2.7.dll[1]
MyGetProcAddress(002559c8, 0040b43a(PyExc_ImportError))
MyGetProcAddress(002559c8, 0040b43a(PyExc_ImportError)) -> 6cf27060
_FindMemoryModule((null), 002559c8) -> libpython2.7.dll[1]
MyGetProcAddress(002559c8, 0040b44c(_Py_PackageContext))
MyGetProcAddress(002559c8, 0040b44c(_Py_PackageContext)) -> 6cf851ec
_FindMemoryModule((null), 002559c8) -> libpython2.7.dll[1]
MyGetProcAddress(002559c8, 0040b45f(PyGILState_Ensure))
MyGetProcAddress(002559c8, 0040b45f(PyGILState_Ensure)) -> 6ceeb1e0
_FindMemoryModule((null), 002559c8) -> libpython2.7.dll[1]
MyGetProcAddress(002559c8, 0040b471(PyGILState_Release))
MyGetProcAddress(002559c8, 0040b471(PyGILState_Release)) -> 6ceeb260
_FindMemoryModule((null), 002559c8) -> libpython2.7.dll[1]
MyGetProcAddress(002559c8, 0040b484(PySys_SetObject))
MyGetProcAddress(002559c8, 0040b484(PySys_SetObject)) -> 6cef2870
_FindMemoryModule((null), 002559c8) -> libpython2.7.dll[1]
MyGetProcAddress(002559c8, 0040b494(PySys_GetObject))
MyGetProcAddress(002559c8, 0040b494(PySys_GetObject)) -> 6cef2550
_FindMemoryModule((null), 002559c8) -> libpython2.7.dll[1]
MyGetProcAddress(002559c8, 0040b4a4(PyString_FromString))
MyGetProcAddress(002559c8, 0040b4a4(PyString_FromString)) -> 6ce8b4b0
_FindMemoryModule((null), 002559c8) -> libpython2.7.dll[1]
MyGetProcAddress(002559c8, 0040b4b8(Py_FdIsInteractive))
MyGetProcAddress(002559c8, 0040b4b8(Py_FdIsInteractive)) -> 6ceedea0
_FindMemoryModule((null), 002559c8) -> libpython2.7.dll[1]
MyGetProcAddress(002559c8, 0040b4cb(PyRun_InteractiveLoop))
MyGetProcAddress(002559c8, 0040b4cb(PyRun_InteractiveLoop)) -> 6ceee340
_FindMemoryModule((null), 002559c8) -> libpython2.7.dll[1]
MyGetProcAddress(002559c8, 0040b4e1(PySys_SetArgv))
MyGetProcAddress(002559c8, 0040b4e1(PySys_SetArgv)) -> 6cef3940
_FindMemoryModule((null), 002559c8) -> libpython2.7.dll[1]
MyGetProcAddress(002559c8, 0040b4ef(PyImport_AddModule))
MyGetProcAddress(002559c8, 0040b4ef(PyImport_AddModule)) -> 6cee2d70
_FindMemoryModule((null), 002559c8) -> libpython2.7.dll[1]
MyGetProcAddress(002559c8, 0040b502(PyModule_GetDict))
MyGetProcAddress(002559c8, 0040b502(PyModule_GetDict)) -> 6ce80710
_FindMemoryModule((null), 002559c8) -> libpython2.7.dll[1]
MyGetProcAddress(002559c8, 0040b513(PySequence_Length))
MyGetProcAddress(002559c8, 0040b513(PySequence_Length)) -> 6ce49c30
_FindMemoryModule((null), 002559c8) -> libpython2.7.dll[1]
MyGetProcAddress(002559c8, 0040b525(PySequence_GetItem))
MyGetProcAddress(002559c8, 0040b525(PySequence_GetItem)) -> 6ce49fe0
_FindMemoryModule((null), 002559c8) -> libpython2.7.dll[1]
MyGetProcAddress(002559c8, 0040b538(PyEval_EvalCode))
MyGetProcAddress(002559c8, 0040b538(PyEval_EvalCode)) -> 6ced4fb0
_FindMemoryModule((null), 002559c8) -> libpython2.7.dll[1]
MyGetProcAddress(002559c8, 0040b548(PyErr_Print))
MyGetProcAddress(002559c8, 0040b548(PyErr_Print)) -> 6ceecba0
_FindMemoryModule((null), 002559c8) -> libpython2.7.dll[1]
MyGetProcAddress(002559c8, 0040b554(PyBool_FromLong))
MyGetProcAddress(002559c8, 0040b554(PyBool_FromLong)) -> 6ce4bee0
_FindMemoryModule((null), 002559c8) -> libpython2.7.dll[1]
MyGetProcAddress(002559c8, 0040b564(Py_VerboseFlag))
MyGetProcAddress(002559c8, 0040b564(Py_VerboseFlag)) -> 6cf8787c
_FindMemoryModule((null), 002559c8) -> libpython2.7.dll[1]
MyGetProcAddress(002559c8, 0040b573(Py_NoSiteFlag))
MyGetProcAddress(002559c8, 0040b573(Py_NoSiteFlag)) -> 6cf87880
_FindMemoryModule((null), 002559c8) -> libpython2.7.dll[1]
MyGetProcAddress(002559c8, 0040b581(Py_OptimizeFlag))
MyGetProcAddress(002559c8, 0040b581(Py_OptimizeFlag)) -> 6cf85080
_FindMemoryModule((null), 002559c8) -> libpython2.7.dll[1]
MyGetProcAddress(002559c8, 0040b591(Py_IgnoreEnvironmentFlag))
MyGetProcAddress(002559c8, 0040b591(Py_IgnoreEnvironmentFlag)) -> 6cf87884
_FindMemoryModule((null), 002559c8) -> libpython2.7.dll[1]
MyGetProcAddress(002559c8, 0040b5aa(PyObject_Str))
MyGetProcAddress(002559c8, 0040b5aa(PyObject_Str)) -> 6ce81180
_FindMemoryModule((null), 002559c8) -> libpython2.7.dll[1]
MyGetProcAddress(002559c8, 0040b5b7(PyList_New))
MyGetProcAddress(002559c8, 0040b5b7(PyList_New)) -> 6ce72db0
_FindMemoryModule((null), 002559c8) -> libpython2.7.dll[1]
MyGetProcAddress(002559c8, 0040b5c2(PyList_SetItem))
MyGetProcAddress(002559c8, 0040b5c2(PyList_SetItem)) -> 6ce73cc0
_FindMemoryModule((null), 002559c8) -> libpython2.7.dll[1]
MyGetProcAddress(002559c8, 0040b5d1(PyList_Append))
MyGetProcAddress(002559c8, 0040b5d1(PyList_Append)) -> 6ce73db0
_LoadLibrary(KERNEL32.DLL, 00000000)
LoadLibraryA(KERNEL32.DLL) -> 7c800000
_LoadLibrary(libpython2.7.dll, 00000000)
_FindMemoryModule(libpython2.7.dll, 00000000) -> libpython2.7.dll[1]
_LoadLibrary(libpython2.7.dll, 00000000) -> libpython2.7.dll[2]
_FindMemoryModule((null), 002559c8) -> libpython2.7.dll[2]
MyGetProcAddress(002559c8, 68e9c2aa(PyArg_ParseTuple))
MyGetProcAddress(002559c8, 68e9c2aa(PyArg_ParseTuple)) -> 6cee0a80
_FindMemoryModule((null), 002559c8) -> libpython2.7.dll[2]
MyGetProcAddress(002559c8, 68e9c2be(PyErr_Format))
MyGetProcAddress(002559c8, 68e9c2be(PyErr_Format)) -> 6cedd2d0
_FindMemoryModule((null), 002559c8) -> libpython2.7.dll[2]
MyGetProcAddress(002559c8, 68e9c2ce(PyErr_NewException))
MyGetProcAddress(002559c8, 68e9c2ce(PyErr_NewException)) -> 6cedd370
_FindMemoryModule((null), 002559c8) -> libpython2.7.dll[2]
MyGetProcAddress(002559c8, 68e9c2e6(PyErr_SetString))
MyGetProcAddress(002559c8, 68e9c2e6(PyErr_SetString)) -> 6cedc850
_FindMemoryModule((null), 002559c8) -> libpython2.7.dll[2]
MyGetProcAddress(002559c8, 68e9c2fa(PyEval_RestoreThread))
MyGetProcAddress(002559c8, 68e9c2fa(PyEval_RestoreThread)) -> 6cece2a0
_FindMemoryModule((null), 002559c8) -> libpython2.7.dll[2]
MyGetProcAddress(002559c8, 68e9c312(PyEval_SaveThread))
MyGetProcAddress(002559c8, 68e9c312(PyEval_SaveThread)) -> 6cece260
_FindMemoryModule((null), 002559c8) -> libpython2.7.dll[2]
MyGetProcAddress(002559c8, 68e9c326(PyExc_MemoryError))
MyGetProcAddress(002559c8, 68e9c326(PyExc_MemoryError)) -> 6cf26fec
_FindMemoryModule((null), 002559c8) -> libpython2.7.dll[2]
MyGetProcAddress(002559c8, 68e9c33a(PyExc_ValueError))
MyGetProcAddress(002559c8, 68e9c33a(PyExc_ValueError)) -> 6cf2701c
_FindMemoryModule((null), 002559c8) -> libpython2.7.dll[2]
MyGetProcAddress(002559c8, 68e9c34e(PyInt_FromLong))
MyGetProcAddress(002559c8, 68e9c34e(PyInt_FromLong)) -> 6ce6e800
_FindMemoryModule((null), 002559c8) -> libpython2.7.dll[2]
MyGetProcAddress(002559c8, 68e9c362(PyModule_AddIntConstant))
MyGetProcAddress(002559c8, 68e9c362(PyModule_AddIntConstant)) -> 6cee9020
_FindMemoryModule((null), 002559c8) -> libpython2.7.dll[2]
MyGetProcAddress(002559c8, 68e9c37e(PyModule_AddObject))
MyGetProcAddress(002559c8, 68e9c37e(PyModule_AddObject)) -> 6cee8f20
_FindMemoryModule((null), 002559c8) -> libpython2.7.dll[2]
MyGetProcAddress(002559c8, 68e9c396(PyModule_AddStringConstant))
MyGetProcAddress(002559c8, 68e9c396(PyModule_AddStringConstant)) -> 6cee9070
_FindMemoryModule((null), 002559c8) -> libpython2.7.dll[2]
MyGetProcAddress(002559c8, 68e9c3b6(PyObject_Free))
MyGetProcAddress(002559c8, 68e9c3b6(PyObject_Free)) -> 6ce83da0
_FindMemoryModule((null), 002559c8) -> libpython2.7.dll[2]
MyGetProcAddress(002559c8, 68e9c3c6(PyString_FromString))
MyGetProcAddress(002559c8, 68e9c3c6(PyString_FromString)) -> 6ce8b4b0
_FindMemoryModule((null), 002559c8) -> libpython2.7.dll[2]
MyGetProcAddress(002559c8, 68e9c3de(PyString_FromStringAndSize))
MyGetProcAddress(002559c8, 68e9c3de(PyString_FromStringAndSize)) -> 6ce8b6e0
_FindMemoryModule((null), 002559c8) -> libpython2.7.dll[2]
MyGetProcAddress(002559c8, 68e9c3fe(PyThread_acquire_lock))
MyGetProcAddress(002559c8, 68e9c3fe(PyThread_acquire_lock)) -> 6cefc320
_FindMemoryModule((null), 002559c8) -> libpython2.7.dll[2]
MyGetProcAddress(002559c8, 68e9c416(PyThread_allocate_lock))
MyGetProcAddress(002559c8, 68e9c416(PyThread_allocate_lock)) -> 6cefc2f0
_FindMemoryModule((null), 002559c8) -> libpython2.7.dll[2]
MyGetProcAddress(002559c8, 68e9c432(PyThread_release_lock))
MyGetProcAddress(002559c8, 68e9c432(PyThread_release_lock)) -> 6cefc360
_FindMemoryModule((null), 002559c8) -> libpython2.7.dll[2]
MyGetProcAddress(002559c8, 68e9c44a(PyType_Type))
MyGetProcAddress(002559c8, 68e9c44a(PyType_Type)) -> 6cf349e0
_FindMemoryModule((null), 002559c8) -> libpython2.7.dll[2]
MyGetProcAddress(002559c8, 68e9c45a(Py_FindMethod))
MyGetProcAddress(002559c8, 68e9c45a(Py_FindMethod)) -> 6ce80480
_FindMemoryModule((null), 002559c8) -> libpython2.7.dll[2]
MyGetProcAddress(002559c8, 68e9c46a(Py_InitModule4))
MyGetProcAddress(002559c8, 68e9c46a(Py_InitModule4)) -> 6cee8b50
_FindMemoryModule((null), 002559c8) -> libpython2.7.dll[2]
MyGetProcAddress(002559c8, 68e9c47e(_PyObject_New))
MyGetProcAddress(002559c8, 68e9c47e(_PyObject_New)) -> 6ce80ee0
_FindMemoryModule((null), 002559c8) -> libpython2.7.dll[2]
MyGetProcAddress(002559c8, 68e9c48e(_PyString_Resize))
MyGetProcAddress(002559c8, 68e9c48e(_PyString_Resize)) -> 6ce8b260
_LoadLibrary(msvcrt.dll, 00000000)
LoadLibraryA(msvcrt.dll) -> 77be0000
_AddMemoryModule(zlib.pyd, 00256d18) -> 00921fe8[1]
_FindMemoryModule((null), 00256d18) -> zlib.pyd[1]
MyGetProcAddress(00256d18, 0040b161(initzlib))
MyGetProcAddress(00256d18, 0040b161(initzlib)) -> 68e82b70
Dumping "VIO8x16.ttf" to "VIO8x16.ttx"...
_LoadLibrary(_struct.pyd, 012e5288)
_LoadLibrary(KERNEL32.DLL, 012e5288)
LoadLibraryA(KERNEL32.DLL) -> 7c800000
_LoadLibrary(libpython2.7.dll, 012e5288)
_FindMemoryModule(libpython2.7.dll, 00000000) -> libpython2.7.dll[2]
_LoadLibrary(libpython2.7.dll, 012e5288) -> libpython2.7.dll[3]
_FindMemoryModule((null), 002559c8) -> libpython2.7.dll[3]
MyGetProcAddress(002559c8, 666d60ec(PyDict_New))
MyGetProcAddress(002559c8, 666d60ec(PyDict_New)) -> 6ce7cb10
_LoadLibrary(msvcrt.dll, 012e5288)
LoadLibraryA(msvcrt.dll) -> 77be0000
_FindMemoryModule((null), 002559c8) -> libpython2.7.dll[3]
_LoadLibrary(_struct.pyd, 012e5288) failed with error 1114
LoadLibraryA(_struct.pyd) -> 00000000
Traceback (most recent call last):
File "fontTools\ttx.pyo", line 309, in main
File "fontTools\ttx.pyo", line 294, in process
File "fontTools\ttx.pyo", line 198, in ttDump
File "fontTools\ttLib\__init__.pyo", line 128, in __init__
File "zipextimporter.pyo", line 74, in load_module
File "fontTools\ttLib\sfnt.pyo", line 17, in <module>
File "zipextimporter.pyo", line 74, in load_module
File "fontTools\misc\sstruct.pyo", line 52, in <module>
File "zipextimporter.pyo", line 74, in load_module
File "struct.pyo", line 1, in <module>
File "zipextimporter.pyo", line 89, in load_module
ImportError: MemoryLoadLibrary failed loading _struct.pyd
(Hit any key to exit)
forget to mention, the issue happens when bundle_files = 1.
With bundle_files = 2, the problem does not exist.