I was looking into the possibility of bundling a slimmed-down wxpython into the OSX application package and ran into a problem. It appears that wxversion.select() does not work with a bundled wxpython. From the wxversion docstring:
NOTE: If you are making a 'bundle' of your application with a tool
like py2exe then you should *not* use the wxversion module since it
looks at the filesystem for the directories on sys.path, it will fail
in a bundled environment. Instead you should simply ensure that the
version of wxPython that you want is found by default on the sys.path
when making the bundled version by setting PYTHONPATH. Then that
version will be included in your bundle and your app will work as
expected.
I suggest changing the CheckForWx() line in globalvar.py, and a bunch of others, to:
if not os.getenv("GRASS_WXBUNDLED"):
CheckForWx()
Then I can set PYTHONPATH and GRASS_WXBUNDLED and the wx gui will use the bundled wxpython. (tested and it works)
-----
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
http://www.kyngchaos.com/
"We are at war with them. Neither in hatred nor revenge and with no particular pleasure I shall kill every ___ I can until the war is over. That is my duty."
"Don't you even hate 'em?"
"What good would it do if I did? If all the many millions of people of the allied nations devoted an entire year exclusively to hating the ____ it wouldn't kill one ___ nor shorten the war one day."
<Ha, ha> "And it might give 'em all stomach ulcers."
- Tarzan, on war
Hi,
2009/3/9 William Kyngesburye <woklist@kyngchaos.com>:
[...]
if not os.getenv("GRASS_WXBUNDLED"):
CheckForWx()
submitted to trunk (r36268) and backported to devbr6 and relbr64.
Martin
--
Martin Landa <landa.martin gmail.com> * http://gama.fsv.cvut.cz/~landa
On Mar 9, 2009, at 3:49 AM, Martin Landa wrote:
if not os.getenv("GRASS_WXBUNDLED"):
CheckForWx()
submitted to trunk (r36268) and backported to devbr6 and relbr64.
Martin
...and many others. I should have listed them all:
gis_set.py
dbm.py
globalvar.py
mapdisp.py
menuform.py
icon.py
wxgui.py
-----
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
http://www.kyngchaos.com/
The equator is so long, it could encircle the earth completely once.
2009/3/9 William Kyngesburye <woklist@kyngchaos.com>:
On Mar 9, 2009, at 3:49 AM, Martin Landa wrote:
if not os.getenv("GRASS_WXBUNDLED"):
CheckForWx()
submitted to trunk (r36268) and backported to devbr6 and relbr64.
Martin
...and many others. I should have listed them all:
gis_set.py
dbm.py
globalvar.py
mapdisp.py
menuform.py
icon.py
wxgui.py
done in r36285.
M.
--
Martin Landa <landa.martin gmail.com> * http://gama.fsv.cvut.cz/~landa
Thanks.
I added documentation of GRASS_WXBUNDLED in lib/init/variables.html (trunk, dev6, rel64).
On Mar 9, 2009, at 10:48 AM, Martin Landa wrote:
2009/3/9 William Kyngesburye <woklist@kyngchaos.com>:
On Mar 9, 2009, at 3:49 AM, Martin Landa wrote:
if not os.getenv("GRASS_WXBUNDLED"):
CheckForWx()
submitted to trunk (r36268) and backported to devbr6 and relbr64.
Martin
...and many others. I should have listed them all:
gis_set.py
dbm.py
globalvar.py
mapdisp.py
menuform.py
icon.py
wxgui.py
done in r36285.
M.
--
Martin Landa <landa.martin gmail.com> * http://gama.fsv.cvut.cz/~landa
_______________________________________________
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev
-----
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
http://www.kyngchaos.com/
"We are at war with them. Neither in hatred nor revenge and with no particular pleasure I shall kill every ___ I can until the war is over. That is my duty."
"Don't you even hate 'em?"
"What good would it do if I did? If all the many millions of people of the allied nations devoted an entire year exclusively to hating the ____ it wouldn't kill one ___ nor shorten the war one day."
<Ha, ha> "And it might give 'em all stomach ulcers."
- Tarzan, on war