So I tried a two-pronged approach:

1) Use hook-sphinx.py to figure out which files in the sphinx package/
sub-packages are data files, and use datas = [] to place them relative
to the executable
2) Use a sys.meta_path import hook (PEP 302) to change any sphinx
module's __file__ attribute to point to the correct path (relative to
sys.executable)

Step 2 doesn't seem to quite work. While I can confirm via print
statements that my import hook object gets inserted into sys.meta_path
when running the EXE produced by pyinstaller, the object never seems
to actually get used - i.e. the load_module() method is never called.

Are we required to use iu.py instead in order to do import hooks? Does
pyinstaller simply ignore sys.meta_path?

Any help is greatly appreciated. See links for my hook-sphinx.py and
sphinx import hooks.

hook-sphinx.py: http://pastebin.com/y6pN5Rx7
support/rthooks/sphinx.py: http://pastebin.com/cGtRu2ve

-- 
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