#41: EnsureDispatch and EnsureModule not working on win32
--------------------------+-------------------------------------------------
       Id:  41            |      Status:  new                               
Component:  PyInstaller   |    Modified:  Tue Feb 21 13:05:16 2006          
 Severity:  major         |   Milestone:                                    
 Priority:  normal        |     Version:  PyInstaller 1.1                   
    Owner:  giovannibajo  |    Reporter:  steve at fullmeasure dot co dot uk
--------------------------+-------------------------------------------------
Changes (by steve at fullmeasure dot co dot uk):

  * version:  PyInstaller 1.0 => PyInstaller 1.1

Comment:

 More info:

 The reason for the noted failure is that when the win32com\gen_py has an
 __init.py it gets added to the imported modules and at runtime the
 gencache.genpy module is that found in out1.pyz/win32com.gen_py rather
 than that created in gencache.__init__.py.
 Then iu importhook sees it and fails to import correctly from
 support\gen_py even though the __path__ is set.

 Solution is to add

 {{{
 if (hasattr(sys.modules["win32com.gen_py"], '__importsub__')):
     delattr(sys.modules["win32com.gen_py"], '__importsub__')
 }}}

 after patch above and the iu imports it properly. Sorted.

 '''Warning''': I have not tested if this interferes with makepy support as
 I have been unable to get direct import of gen_py files to work at all.

 -----
 Observation: EnsureDispatch creates the gen_py files in a different format
 to Makepy and I noticed that the version checking code in EnsureModule
 seems to assume the makepy version. This may be a small bug.

-- 
Ticket URL: <http://pyinstaller.hpcf.upr.edu/cgi-bin/trac.cgi/ticket/41>
PyInstaller <http://pyinstaller.hpcf.upr.edu>
PyInstaller

_______________________________________________
PyInstaller mailing list
[email protected]
http://lists.hpcf.upr.edu/mailman/listinfo/pyinstaller

Reply via email to