So, I've looked through the PyInstaller 2.0 source and it seems like
adjusting the existing hooks to add an exclude is fairly tricky/maybe
impossible as the hook interface stands today.
The problem seems to be due to:
* pubsub\__init__.pyc gets scanned before pubsub\setuparg1.pyc
* Hooks only see the state for the module they're hooking (and thus can't
add an exclude (which exists at ImportTracker level) or remove a computed
import from someone else's module)
This seems to imply I can't modify pubsub\__init__.pyc's scanned import
list while running the pubsub\core hook.
Hardcoding the exclude of 'wx.lib.pubsub.autosetuppubsubv1' in the Analysis
constructor for wxPython 2.9.3 or later users seems the way to go.
Anybody else have an idea how to adjust the hooks to get this to work?
Should I look at the development source for better chance at writing the
hook?
Thanks,
Bill
On Friday, March 8, 2013 11:34:45 AM UTC-5, Bill Tutt wrote:
> The existing PyInstaller hooks work with wxPython 2.8.x (as long as you
> want arg1 or kwargs (and thus pubsubv3), but in 2.9.x they made a change to
> pubsub\__init__.py that needs additional special handling.
>
> In wx\lib\pubsub\__init__.py there is a function _tryAutoSetupV1().
>
> In wxPython 2.8.x it tried to find "autosetuppubsubv1" via:
>
> import imp;
> imp.find_module('autosetuppubsubv1')
>
> In wxPython 2.9.x they changed that to:
>
> import autosetuppubsubv1
>
> So, in order for arg1, or kwargs pubsub v3 to work with the existing hooks
> see kwargs or arg1 usage they should also auto add 'autosetuppubsubv1' to
> the exclude list so that you don't get that dreaded pubsubconf.py
> AssertionError exception.
>
>
>
--
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.