[GRASS-user] problems compiling grass 7

Glynn Clements glynn at gclements.plus.com
Thu Jun 18 13:56:35 EDT 2009

Martin Landa wrote:

> >> etc/python/grass/__init__.py shouldn't contain "import lib" - it's
> >> bug.
> >
> > Commenting "import lib" soved it.
> OK, anyway it's wrong that this line was written to __init__.py when
> compilation of Python Swig failed.

IMHO, this line shouldn't be written in either case. Code wishing to
use the SWIG bindings should explicitly use "import grass.lib". Or,
preferably, import "grass.lib.grass" etc. Loading a dozen libraries
"just in case" is a waste of resources and a potential source of

Actually, I see no reason for grass/__init__.py to exist. Code can
just import grass.script or grass.lib or both as required.

Glynn Clements <glynn at gclements.plus.com>

More information about the grass-user mailing list