py2exe, mx.ODBC

Marco Aschwanden PPNTWIMBXFFC at spammotel.com
Tue Mar 23 09:38:24 EST 2004


Hi

- Win2000
- Python 2.3.3
- py2exe 0.5.0
- eGenix Comercial & Base Package

I am developing an app using mxODBC. On the home page they say

http://www.egenix.com/files/python/mxODBC.html#Hints

that one has to include

-i mx.ODBC.Windows,mx.DateTime

for py2exe find the appropriate files.

Well, I did that and called my setup.py as follows:

python setup.py py2exe -i mx.ODBC.Windows,mx.DateTime

The files and exes are created... here an excerpt of the creation log:

running py2exe
[... creating dirs zipped ...]

*** searching for required modules ***
*** parsing results ***
creating python loader for extension '_sre'
creating python loader for extension 'datetime'
creating python loader for extension 'wxPython.gridc'
creating python loader for extension 'wxPython.wxc'
creating python loader for extension 'mx.DateTime.mxDateTime.mxDateTime'
creating python loader for extension 'mx.ODBC.Windows.mxODBC'
*** finding dlls needed ***
*** create binaries ***
*** byte compile python files ***
byte-compiling C:\Python23\lib\site-packages\mx\ODBC\Windows\__init__.py 
to mx\ODBC\Windows\__init__.pyc
creating D:\myapp\build\bdist.win32\winexe\collect\mx
creating D:\myapp\build\bdist.win32\winexe\collect\mx\ODBC
creating D:\myapp\build\bdist.win32\winexe\collect\mx\ODBC\Windows
byte-compiling C:\Python23\lib\site-packages\mx\ODBC\ODBC.py to 
mx\ODBC\ODBC.pyc
byte-compiling c:\Python23\lib\copy_reg.py to copy_reg.pyc
byte-compiling C:\Python23\lib\site-packages\wxPython\fonts.py to 
wxPython\fonts.pyc
creating D:\myapp\build\bdist.win32\winexe\collect\wxPython
byte-compiling C:\Python23\lib\site-packages\wxPython\windows.py to 
wxPython\windows.pyc
byte-compiling d:\myapp\grid_tools.py to grid_tools.pyc
byte-compiling c:\Python23\lib\locale.py to locale.pyc
byte-compiling D:\myapp\build\bdist.win32\winexe\temp\_sre.py to _sre.pyc
byte-compiling C:\Python23\lib\site-packages\mx\ODBC\Windows\dbtypes.py to 
mx\ODBC\Windows\dbtypes.pyc
byte-compiling c:\Python23\lib\macpath.py to macpath.pyc
byte-compiling c:\Python23\lib\popen2.py to popen2.pyc
byte-compiling c:\Python23\lib\stat.py to stat.pyc
byte-compiling D:\myapp\build\bdist.win32\winexe\temp\datetime.py to 
datetime.pyc
byte-compiling c:\Python23\lib\atexit.py to atexit.pyc
byte-compiling D:\myapp\build\bdist.win32\winexe\temp\wxPython.gridc.py to 
wxPython\gridc.pyc
byte-compiling C:\Python23\lib\site-packages\wxPython\events.py to 
wxPython\events.pyc
byte-compiling C:\Python23\lib\site-packages\wxPython\utils.py to 
wxPython\utils.pyc
byte-compiling C:\Python23\lib\site-packages\mx\DateTime\DateTime.py to 
mx\DateTime\DateTime.pyc
creating D:\myapp\build\bdist.win32\winexe\collect\mx\DateTime
byte-compiling C:\Python23\lib\site-packages\wxPython\grid.py to 
wxPython\grid.pyc
byte-compiling C:\Python23\lib\site-packages\wxPython\controls2.py to 
wxPython\controls2.pyc
byte-compiling C:\Python23\lib\site-packages\mx\Misc\__init__.py to 
mx\Misc\__init__.pyc
creating D:\myapp\build\bdist.win32\winexe\collect\mx\Misc
byte-compiling C:\Python23\lib\site-packages\mx\DateTime\Parser.py to 
mx\DateTime\Parser.pyc
byte-compiling d:\myapp\addresses_impl.py to addresses_impl.pyc
byte-compiling C:\Python23\lib\site-packages\mx\DateTime\Timezone.py to 
mx\DateTime\Timezone.pyc
byte-compiling 
C:\Python23\lib\site-packages\mx\DateTime\mxDateTime\__init__.py to 
mx\DateTime\mxDateTime\__init__.pyc
creating D:\myapp\build\bdist.win32\winexe\collect\mx\DateTime\mxDateTime
byte-compiling C:\Python23\lib\site-packages\wxPython\printfw.py to 
wxPython\printfw.pyc
byte-compiling C:\Python23\lib\site-packages\wxPython\misc.py to 
wxPython\misc.pyc
byte-compiling c:\Python23\lib\linecache.py to linecache.pyc
byte-compiling c:\Python23\lib\warnings.py to warnings.pyc
byte-compiling c:\Python23\lib\_strptime.py to _strptime.pyc
byte-compiling C:\Python23\lib\site-packages\wxPython\streams.py to 
wxPython\streams.pyc
byte-compiling c:\Python23\lib\sre_constants.py to sre_constants.pyc
byte-compiling c:\Python23\lib\re.py to re.pyc
byte-compiling C:\Python23\lib\site-packages\mx\DateTime\ISO.py to 
mx\DateTime\ISO.pyc
byte-compiling c:\Python23\lib\ntpath.py to ntpath.pyc
byte-compiling C:\Python23\lib\site-packages\mx\DateTime\ARPA.py to 
mx\DateTime\ARPA.pyc
byte-compiling c:\Python23\lib\sre_compile.py to sre_compile.pyc
byte-compiling D:\myapp\build\bdist.win32\winexe\temp\wxPython.wxc.py to 
wxPython\wxc.pyc
byte-compiling C:\Python23\lib\site-packages\wxPython\filesys.py to 
wxPython\filesys.pyc
byte-compiling C:\Python23\lib\site-packages\wxPython\stattool.py to 
wxPython\stattool.pyc
byte-compiling C:\Python23\lib\site-packages\wxPython\controls.py to 
wxPython\controls.pyc
byte-compiling C:\Python23\lib\site-packages\wxPython\__version__.py to 
wxPython\__version__.pyc
byte-compiling c:\Python23\lib\string.py to string.pyc
byte-compiling c:\Python23\lib\rfc822.py to rfc822.pyc
byte-compiling c:\Python23\lib\UserDict.py to UserDict.pyc
byte-compiling d:\myapp\addresses_wdr.py to addresses_wdr.pyc
byte-compiling C:\Python23\lib\site-packages\mx\Misc\LazyModule.py to 
mx\Misc\LazyModule.pyc
byte-compiling C:\Python23\lib\site-packages\wxPython\wx.py to 
wxPython\wx.pyc
byte-compiling C:\Python23\lib\site-packages\wxPython\sizers.py to 
wxPython\sizers.pyc
byte-compiling c:\Python23\lib\repr.py to repr.pyc
byte-compiling 
D:\myapp\build\bdist.win32\winexe\temp\mx.DateTime.mxDateTime.mxDateTime.py 
to mx\DateTime\mxDateTime\mxDateTime.pyc
byte-compiling c:\Python23\lib\sre_parse.py to sre_parse.pyc
byte-compiling c:\Python23\lib\copy.py to copy.pyc
byte-compiling 
D:\myapp\build\bdist.win32\winexe\temp\mx.ODBC.Windows.mxODBC.py to 
mx\ODBC\Windows\mxODBC.pyc
byte-compiling c:\Python23\lib\types.py to types.pyc
byte-compiling c:\Python23\lib\posixpath.py to posixpath.pyc
byte-compiling C:\Python23\lib\site-packages\wxPython\windows3.py to 
wxPython\windows3.pyc
byte-compiling C:\Python23\lib\site-packages\wxPython\windows2.py to 
wxPython\windows2.pyc
byte-compiling d:\myapp\inihandler.py to inihandler.pyc
byte-compiling c:\Python23\lib\sre.py to sre.pyc
byte-compiling C:\Python23\lib\site-packages\wxPython\cmndlgs.py to 
wxPython\cmndlgs.pyc
byte-compiling C:\Python23\lib\site-packages\mx\__init__.py to 
mx\__init__.pyc
byte-compiling c:\Python23\lib\os2emxpath.py to os2emxpath.pyc
byte-compiling C:\Python23\lib\site-packages\wxPython\frames.py to 
wxPython\frames.pyc
byte-compiling C:\Python23\lib\site-packages\wxPython\__init__.py to 
wxPython\__init__.pyc
byte-compiling c:\Python23\lib\calendar.py to calendar.pyc
byte-compiling C:\Python23\lib\site-packages\mx\ODBC\__init__.py to 
mx\ODBC\__init__.pyc
byte-compiling C:\Python23\lib\site-packages\wxPython\image.py to 
wxPython\image.pyc
byte-compiling C:\Python23\lib\site-packages\wxPython\mdi.py to 
wxPython\mdi.pyc
byte-compiling C:\Python23\lib\site-packages\mx\DateTime\__init__.py to 
mx\DateTime\__init__.pyc
byte-compiling C:\Python23\lib\site-packages\wxPython\gdi.py to 
wxPython\gdi.pyc
byte-compiling c:\Python23\lib\os.py to os.pyc
byte-compiling C:\Python23\lib\site-packages\wxPython\misc2.py to 
wxPython\misc2.pyc
byte-compiling C:\Python23\lib\site-packages\wxPython\clip_dnd.py to 
wxPython\clip_dnd.pyc
*** copy extensions ***
copying c:\Python23\DLLs\_sre.pyd -> D:\myapp\dist
copying c:\Python23\DLLs\datetime.pyd -> D:\myapp\dist
copying C:\Python23\lib\site-packages\wxPython\gridc.pyd -> D:\myapp\dist
copying C:\Python23\lib\site-packages\wxPython\wxc.pyd -> D:\myapp\dist
copying 
C:\Python23\lib\site-packages\mx\DateTime\mxDateTime\mxDateTime.pyd -> 
D:\myapp\dist
copying C:\Python23\lib\site-packages\mx\ODBC\Windows\mxODBC.pyd -> 
D:\myapp\dist
*** copy dlls ***
copying C:\WINNT\system32\python23.dll -> D:\myapp\dist
copying C:\Python23\lib\site-packages\wxPython\wxmsw24h.dll -> 
D:\myapp\dist
copying C:\WINNT\system32\ODBC32.dll -> D:\myapp\dist
copying c:\Python23\w9xpopen.exe -> D:\myapp\dist
*** copy data files ***
copying clients16x16.bmp -> D:\myapp\dist\
copying clients16x16_mask.bmp -> D:\myapp\dist\
copying clients32x32.ico -> D:\myapp\dist\
copying C:\Python23\lib\site-packages\py2exe\run_w.exe -> 
D:\myapp\dist\addresses.exe
The following modules appear to be missing
['mxDateTime.__version__', 'mx.ODBC.Windows.DriverConnect']


As you can see, in the last two lines it complains about not finding 
mxDateTime.__version__ and mx.ODBC.Windows.DriverConnect.

The wxWindows application runs but has of course no database connection. 
Am I missing here something? Here are the files created in the dist-folder:

clients16x16_mask.bmp
clients32x32.ico
datetime.pyd
addresses.exe
gridc.pyd
library.zip
mxDateTime.pyd
mxODBC.pyd
ODBC32.dll
python23.dll
w9xpopen.exe
wxc.pyd
wxmsw24h.dll
_sre.pyd

As you can see: mxDateTime.pyd and mxODBC.pyd are here...

Do you have any ideas what I must do, that mxODBC can be added properly to 
the "exe"?

Thanks for any hints,
Greetings,
Marco





More information about the Python-list mailing list