[GRASS-user] Local Relief Model tool

Hamish hamish_b at yahoo.com
Wed Sep 25 23:48:39 PDT 2013


Eric:
> To install in a linux environment, I followed the instructions at
> http://grasswiki.osgeo.org/wiki/GRASS_and_Python#Testing_and_installing_Python_extensions.
>
> I haven't been able to find solid information on how users who don't
> compile themselves can install an addon that isn't available via
> g.extension.

In general it's quite simple, users maintain a directory with all of
their executable scripts in it and before starting GRASS add
export GRASS_ADDON_PATH=/path/to/files
to their ~/.bashrc. (~/.grass.bashrc is no good, the variable has to
be set before grass starts)

Then it magically finds them. The g.extension module(s) just fits itself
into that and creates you an addon dir if one wasn't already set.
For scripts there is no other install or compiling needed, just put
it in a dir somewhere which is in the $PATH.

Python might be a problem, but if you just call your module by its full
name it should be ok (so with or without .py, just be sure to match
the exact filename).


> There is
> http://grasswiki.osgeo.org/wiki/Compile_and_Install#Scripts, but I'm
> not sure how that applies to Windows users. Any advice in this area
> would be much appreciated.

The GRASS 6 make system is still missing build support for python
scripts (often it tries to reuse the shell Script.make, which mostly
works on Linux). Smooth building with correct .bat file wrappers
on Windows remains an issue. It can be done, I've seen it work, but
still needs a new PythonScript.make to work smoothly. (similarly user-
created personal shell scripts for GRASS 7 should have a ShellScript.make
to help folks who need that, even if there are none in the main release.)


regards,
Hamish



More information about the grass-user mailing list