wxPython pubsub saga (but with 2.9.3)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

wxPython pubsub saga (but with 2.9.3)

Bill Tutt
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.
 
I just don't know how to add that to the hook.
 
I'd be glad to generate a patch for the hook if somebody can point the way.
 
Thanks,
Bill
 

--
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 [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/pyinstaller?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: wxPython pubsub saga (but with 2.9.3)

dhyams
Bill:

I've been using pyinstaller with the 2.9 wxPython series for a while; are you using the most updated development copy of pyinstaller?


On Fri, Mar 8, 2013 at 11:34 AM, Bill Tutt <[hidden email]> 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.
 
I just don't know how to add that to the hook.
 
I'd be glad to generate a patch for the hook if somebody can point the way.
 
Thanks,
Bill
 

--
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 [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/pyinstaller?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Daniel Hyams
[hidden email]

--
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 [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/pyinstaller?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: wxPython pubsub saga (but with 2.9.3)

Bill Tutt
They made the change in 2.9.3 (or later) on 12/11/2011 in wxPython's SVN repo. I'm using PyInstaller 2.0.
 
Fyi,
Bill
 

On Monday, March 11, 2013 9:04:59 AM UTC-4, dhyams wrote:
Bill:

I've been using pyinstaller with the 2.9 wxPython series for a while; are you using the most updated development copy of pyinstaller?


On Fri, Mar 8, 2013 at 11:34 AM, Bill Tutt <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="3cc6YSed1IkJ">bill...@...> 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.
 
I just don't know how to add that to the hook.
 
I'd be glad to generate a patch for the hook if somebody can point the way.
 
Thanks,
Bill
 

--
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 <a href="javascript:" target="_blank" gdf-obfuscated-mailto="3cc6YSed1IkJ">pyinstaller...@googlegroups.com.
To post to this group, send email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="3cc6YSed1IkJ">pyins...@....
Visit this group at http://groups.google.com/group/pyinstaller?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Daniel Hyams
<a href="javascript:" target="_blank" gdf-obfuscated-mailto="3cc6YSed1IkJ">dhy...@...

--
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 [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/pyinstaller?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: wxPython pubsub saga (but with 2.9.3)

dhyams
Hmm, OK.  I'm using 2.9.1.1.

On Mon, Mar 11, 2013 at 12:17 PM, Bill Tutt <[hidden email]> wrote:
They made the change in 2.9.3 (or later) on 12/11/2011 in wxPython's SVN repo. I'm using PyInstaller 2.0.
 
Fyi,
Bill
 

On Monday, March 11, 2013 9:04:59 AM UTC-4, dhyams wrote:
Bill:

I've been using pyinstaller with the 2.9 wxPython series for a while; are you using the most updated development copy of pyinstaller?


On Fri, Mar 8, 2013 at 11:34 AM, Bill Tutt <[hidden email]> 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.
 
I just don't know how to add that to the hook.
 
I'd be glad to generate a patch for the hook if somebody can point the way.
 
Thanks,
Bill
 

--
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 pyinstaller...@googlegroups.com.
To post to this group, send email to [hidden email].



--
Daniel Hyams
[hidden email]

--
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 [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/pyinstaller?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Daniel Hyams
[hidden email]

--
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 [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/pyinstaller?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: wxPython pubsub saga (but with 2.9.3)

Bill Tutt
In reply to this post by Bill Tutt
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 [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/pyinstaller?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.