[GRASS-dev] grass7 on mac OSX

Glynn Clements glynn at gclements.plus.com
Sun Jun 6 19:15:48 EDT 2010


William Kyngesburye wrote:

> >> That works, dist/etc/python/grass/lib now fully populated, no make
> >> errors (besides the ignored CPP unknown architecture errors).
> > 
> > Does the wxGUI NVIZ module work?

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

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)

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

-- 
Glynn Clements <glynn at gclements.plus.com>


More information about the grass-dev mailing list