[spambayes-dev] FW: [Spambayes] Problem with Spam bayesinstallation on Windows 2000pc

Mark Hammond mhammond at skippinet.com.au
Wed Nov 19 17:42:10 EST 2003

> Here's what I think is happening.  When we build the binary installer,
> we have win32com pre-generate the typelib wrappers (gen_py cache) and
> put them into the binary.  We do this using the Outlook 2000 typelib,
> which has a typelib version of 9.0.
> At runtime, win32com checks to see if that same typelib version is
> installed.  If not, it checks to see if it can substitute a
> typelib with
> a higher minor version number.  Outlook 2002 (XP) has a
> typelib version
> of 9.1, and Outlook 2003 is version 9.2.
> In this case, win32com does not find the version 9.0 typelib
> but it does
> find the 9.1 typelib.  In order to substitute the newer typelib,
> win32com attempts to regenerate the wrappers because they
> don't exist in
> the binary, and it attempts to write them into the app installation
> directory.  If the user doesn't have admin privileges then this fails.
> Any thoughts on how we should handle this?  Should we include multiple
> versions of the typelib wrappers?  Can we force win32com to output to
> the user's temp directory?  Am I maybe just missing the root cause
> entirely?

I think you are on the money.  However, the world has shifted.  Newer
versions will be released using py2exe, and will have the "gencache" inside
the .zip file.  win32com will then consider it "read-only", and in the
scenario you outline above *should* use the pre-generated 9.0 typelib (as it
has the same minor version).

My testing shows this to work fine with a 9.1 typelib.  I *hope* that the
logic still holds up when a 9.2 exists too <wink>.  The tlb
checking/validation code is pretty horrible and due for a cleanup (but I
didn't write it this time <wink>)


More information about the spambayes-dev mailing list