akineko
Sat, 28 Jun 2008 16:45:21 -0700
Hi, (This is to record my approach to solve the problem) After pondering for days, I decided to use the (1) scheme I mentioned: (1) Create a phony import to use hook-<module> scheme I created a completely empty module (ex. A.py) and added an import to the toplevel module. Then I created hook file (hook-A.py) and listed all hidden imports (I found many). Listed modules are considered when PyInstaller tries to import A.py. (It is a well crafted mechanism, I would say.) Of course, this hook file may need to be changed if I try to execute a different script. But that is not a problem for now as I know which script to be executed. I resisted adding a completely empty file to my project but I concluded that (1) is better than other alternatives. I also found that analyzer.modules is the database that holds collected modules. Therefore, you can manipulate it to add modules directly. Aki- On Jun 26, 9:11 am, akineko <[EMAIL PROTECTED]> wrote: > Hello Simone Ramacci, > > Which imports are required is determined once which script to be > executed. > hooks scheme is the way to provide such info that only user can know. > But it was not quite usable with my case as no imports except system > modules. > PyInstaller is creating a database of all collected imports. So, the > question is how to influence the database creation. > I can resolve my problem by: > (1) Create a phoney import to use hook-<module> scheme > (2) Create a separate hook directory and use hook-<module> scsheme > using system module import > (3) Tweak PyInstaller scripts to add a list of imports explicitly > (4) Put phoney imports to the top level > > I don't like none of them but I may need to resort to such. > > Thank you, > Aki Niimura --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "PyInstaller" group. To post to this group, send email to PyInstaller@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---