[GRASS-dev] any idea about these python libraries?

Glynn Clements glynn at gclements.plus.com
Sun May 31 04:51:40 EDT 2009


William Kyngesburye wrote:

> > Nothing in GRASS should link directly to them on OSX.  Only wxpython  
> > modules should link to the wx libraries, vdigit just loads wxpython.
> >
> I found that wx nviz and vdigit *did* link the wx libraries - a  
> reversion in the switch to setup.py that I missed.  Fixed now in SVN.

Code which calls wx functions directly *should* be explicitly linking
against the wx libraries.

Even if you can rely upon wx having been loaded by wxPython, there are
other issues, e.g. Gentoo's revdep-rebuild relies upon "ldd" output
for dependency tracking, and won't be able to detect that these files
need to be re-built if wx is updated unless they are explicitly linked
against the wx libraries.

> It doesn't hurt to link the wx libraries, but maybe, if there are  
> multiple copies of wxpython installed (system and /usr/local), the one  
> that was linked at compile time is different than the one found in  
> sys.path at run time.  This would cause trouble.

There isn't anything you can do about this; even if you force e.g.
the vdigit module to use a specific version of wx with e.g. -rpath, if
wxPython itself loads a different version, either vdigit will end up
using that version (wrong) or you will end up with two different
versions in memory (also wrong).

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


More information about the grass-dev mailing list