David Cortesi píše v Čt 11. 04. 2013 v 15:26 -0700:
> * writing a hook

- You could use the information from section 'Outdated Features -> mf.py
-> Hooks'.
- the text starting with 'A hook is a module named..' is still valid. 
- you could append this information to section 'Using Hook Files'.
- then also add to the 'datas' attribute the following note:


---
If all PACKAGE data files are in the directory
'site-packages/PACKAGENAME'  the hook file to collect all PACKAGE data
file could look like:

  from hookutils import collect_data_files
  datas = collect_data_files('package_name')

And all package related data files will be copied
- onedir: into directory DIST_PATH/APP_NAME/package_name
- onefile: same file hierarchy as with onedir but bundled within
the .exe file.

Example: ./PyInstaller/hooks/hook-pytz.py
---

- for 'hiddenimports' there is also helper function
'collect_submodules'.
- if you need to include all modules like

  hiddenimports = ['package.mod1', 'package.mod2', 'package.mod3', 
    'package.mod4']

then this code could be replaced by code like

  from hookutils import collect_submodules
  hiddenimports = collect_submodules('package')

Example: ./PyInstaller/hooks/hook-docutils.py



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


Reply via email to