[GRASS-dev] grass7 on mac OSX
William Kyngesburye
woklist at kyngchaos.com
Sun Jun 6 19:45:31 EDT 2010
On Jun 6, 2010, at 6:15 PM, Glynn Clements wrote:
>> I got an error starting the GUI:
>> File "/Users/Shared/src/GRASS/svn/trunk/dist.i386-apple-darwin10.3.1/etc/gui/wxpython/gui_modules/ghelp.py", line 348, in __init__
>> super(ItemTree, self).__init__(parent, id, ctstyle = ctstyle, **kwargs)
>> TypeError: __init__() got an unexpected keyword argument 'ctstyle'
>
> The wx.lib.agw.customtreectrl.CustomTreeCtrl constructor appears to
> have lost one of its arguments. In wxPython-2.8.10.1 it looks like:
>
Ah, I recently updated to wxpython 2.8.11.
> class CustomTreeCtrl(wx.PyScrolledWindow):
>
> def __init__(self, parent, id=wx.ID_ANY, pos=wx.DefaultPosition, size=wx.DefaultSize,
> style=TR_DEFAULT_STYLE, ctstyle=0, validator=wx.DefaultValidator,
> name="CustomTreeCtrl"):
>
> However, the documentation says:
>
> ctstyle: kept for backward compatibility.
>
> Its only use is:
>
> style = style | ctstyle
>
> I suggest:
>
> - super(ItemTree, self).__init__(parent, id, ctstyle = ctstyle, **kwargs)
> + if 'style' in kwargs:
> + ctstyle |= kwargs['style']
> + del kwargs['style']
> + super(ItemTree, self).__init__(parent, id, style = ctstyle, **kwargs)
>
That seems to work, for ghelp.py, though there appear to be many instances of this usage that would have to be changed.
>> P.S. in testing this, I found that the configured prefix is hardwired
>> into the grass70 startup python script. I often make a bindist, which
>> leaves a complete runable app package in the macosx folder that I will
>> run, instead of make install-ing. GRASS won't run at all outside of its
>> configured path :(
>
> The real-install target in Install.make creates the grass70 script
> from dist.<arch>/grass70.tmp, substituting the correct value for
> @GISBASE at . the bin.<arch>/grass70 script isn't installed.
>
> If $(MACOSX_APP) is set, this is bypassed in favour of the rules in
> macosx/Makefile. Maintaining that is a job for someone who actually
> has a Mac.
>
Well, in the past (and in GRASS 6.x) for OSX, I ignored the grassXX startup script and use a custom one, which ran the init.sh. It set GISBASE dynamically, from the path the script is in, and init.sh respected that. But now that grassXX IS init.sh, I have to install that, and yes I do change it to the correct GISBASE path. I just didn't notice until now that it overrides any GISBASE setting already in the environment.
-----
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
http://www.kyngchaos.com/
Theory of the Universe
There is a theory which states that if ever anyone discovers exactly what the universe is for and why it is here, it will instantly disappear and be replaced by something even more bizarrely inexplicable. There is another theory which states that this has already happened.
-Hitchhiker's Guide to the Galaxy 2nd season intro
More information about the grass-dev
mailing list