W dniu 08.10.2014 o 13:04, Glynn Clements pisze:
Maciej Sieczka wrote:

      --with-wxwidgets=/usr/bin/wx-config-2.8

Per 2.8 wxWidgets specified, I don't get it why
/usr/lib/python2.7/site-packages/wx-3.0-gtk2/ gets involved in iclass
build. I would rather expect it to pick
/usr/lib/python2.7/site-packages/wx-2.8-gtk2-unicode/. Some details:

--with-wxwidgets only affects compiled (C/C++) code which links
against the wxWidges libraries. In 7.0, this means the wximgview
module (visualization/wximgview) and nothing else. It doesn't affect
wxGUI.

In theory, code which uses the wxPython library is supposed to use
something like:

        import wxversion
        wxversion.select('2.8')
        import wx

to ensure that the correct version is used when there are multiple
versions present on the system.

This is an Arch box. I do have all the NumPy stuff installed. There is a
problem on Arch that wx-3.0-gtk2/wx/lib/plot.py fails to import
numpy.oldnumeric [1] leading to those "NumPy not found" errors, but that
would not happen if iclass build referred to
wx-2.8-gtk2-unicode/wx/lib/plot.py instead - like I guess all the other
GRASS 7 Python modules do.

Maybe everything is using wx-3.0, but only iclass is using the broken
plots.py functionality?

If you can run some other g.gui.* module, you can check which
libraries it's actually using with "cat /proc/<pid>/maps", where <pid>
is the PID of the g.gui.* process.

Indeed!

I patched iclass/g.gui.iclass.py with "wxversion.select('2.8')", just to let a full GRASS 7 build complete without errors, and actually every g.gui.* module except iclass is using wx-3.0-gtk2...

Is using a mix of wxPython 2.8 and 3.0 like this going to pose any usage problems in core GRASS or plugins?

Could GRASS offer a mechanism to enforce a specific wxPython version throughout all of GRASS build and run time? Or how to hack it in a more elegant way than patching those ~140 *.py files which import wx?

I can't just uninstall wxpython (which provides the problematic wx-3.0-gtk2), because wxpython-2.8 (providing an OK wx-2.8-gtk2-unicode) depends on it...

Maciek

--
Maciej Sieczka
http://www.sieczka.org

_______________________________________________
grass-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/grass-dev

Reply via email to