Krzysztof Jakubczyk pisze:
> I think the best solution would be not to cache content (listdir) of 
> real directories from disk (which can be always easily updated) - and 
> cache what is present in archive as now.
>
> >
>
>   
I tried to create rthook to solve this problem, it would be something 
like this:
import iu

origCaseOk = iu.caseOk

def caseOk(filename):
    files = iu.listdir(iu._os_path_dirname(filename))
    return iu._os_path_basename(filename) in files

class ComtypesGenDirOwner(iu.DirOwner):
    def getmod(self, nm):      
        print "COMTYPES: testing:", nm
        if not nm.startswith('comtypes.gen.'):
            return None #Ignore for any different module
        print "COMTYPES: Running my get mod"
        try:
            iu.caseOk = caseOk
            return iu.DirOwner.getmod(self, nm)
        finally:
            iu.caseOk = origCaseOk

iu._globalownertypes.insert(0, ComtypesGenDirOwner)

The problem is that PYZOwner from archive.py gives PathImportDirector 
[iu.DirOwner] as ownertypes parameter so globalownertypes is not taken 
into consideration.
I'm not sure if it can be easily done without modifications in 
pyInstaller itself :/

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/pyinstaller?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to