[GRASS-user] AddOn or Script when compiling GRASS from source
Glynn Clements
glynn at gclements.plus.com
Thu Oct 13 04:30:11 EDT 2011
William Kyngesburye wrote:
> I think the only reason GRASS keeps them separate is because Windows
> needs them that way, and on Linux and OS X scripts can be in the
> compiled "bin" folder without a problem. And at least on OS X it's best
> that scripts be in the bin/ folder because it won't look in the addon
> scripts folder to run them (I could fix that, but there are other issues
> with multiple paths in GRASS_ADDON_PATH).
There shouldn't be any need for that. Current usage of
GRASS_ADDON_PATH in 7.0 is:
lib/init/grass.py:
path_prepend(addon_path, 'PATH')
path_prepend(os.path.join(addon_path, 'scripts'), 'PATH')
path_prepend(os.path.join(addon_path, 'bin'), 'PATH')
gui/wxpython/gui_modules/globalvar.py:
path = os.getenv('GRASS_ADDON_PATH')
bpath = os.path.join(path, 'bin')
spath = os.path.join(path, 'scripts')
scripts/g.manual/g.manual.py:
path = os.path.join(os.getenv('GRASS_ADDON_PATH'), 'docs', 'html', entry + '.html')
path = os.path.join(os.getenv('GRASS_ADDON_PATH'), 'man', 'man1', entry + '.1')
IOW, GRASS_ADDON_PATH is supposed to be the root of the add-on
hierarchy, analogous to GISBASE for the main installation.
BTW, this (in lib/init/grass.py) is wrong:
path_prepend(addon_path, 'PATH')
Its presence might indicate a bug somewhere else.
--
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-user
mailing list