py2exe odbc:cannot import dbi module

Thomas Heller theller at python.net
Thu Mar 4 14:10:46 EST 2004


mederis at hotmail.com (Marc Ederis) writes:

> Great, it works, thanks Thomas!
>
> But why did you say that odbc32.dll shouldn't be distributed? Because
> our distribution should only contain python specific files?
> If that's the reason, then I should probably take out MFC42.dll too,
> right? Well, I'll just take them out and test... I guess I should
> really familiarize myself with distutils, so I understand more about
> all this!

This has nothing to do with distutils.

There are legal reasons (but IANAL), you must check for each file if you
are allowed to redistribute it.

Second, there are technical reasons.  I'm not sure if you distribute
odbc32.dll whether the resulting executable would work on a machine
where no odbc is installed or not, but I guess there are more files
needed.  For Windows, you probably need to download something called
'Microsoft data access components', follow their installation
guidelines, and make sure that you read their license (or not ;-)

py2exe can only make an educated guess whether the files it collects are
'system files' which must not be redistributed or not, which fails in
this case for odbc32.dll.

Thomas





More information about the Python-list mailing list