[GRASS-dev] GRASS addons dependencies

Panagiotis Mavrogiorgos pmav99 at gmail.com
Thu Feb 4 13:28:33 PST 2016


Hi everybody,

Some addons depend on other addons. E.g. r.lfp depends on r.stream.distance.

If you try to use it while r.stream.distance is not installed, you get the
following traceback which is not particularly helpful; especially so if you
are not familiar with Python.

Traceback (most recent call last):
>   File "/home/grassuser/.grass7/addons/scripts/r.lfp", line 111, in
> <module>
>     sys.exit(main())
>   File "/home/grassuser/.grass7/addons/scripts/r.lfp", line 43, in main
>     calculate_lfp(input, output, coords)
>   File "/home/grassuser/.grass7/addons/scripts/r.lfp", line 67, in
> calculate_lfp
>     distance=flds)
>   File "/usr/lib/grass70/etc/python/grass/script/core.py", line 392, in
> run_command
>     ps = start_command(*args, **kwargs)
>   File "/usr/lib/grass70/etc/python/grass/script/core.py", line 361, in
> start_command
>     return Popen(args, **popts)
>   File "/usr/lib/grass70/etc/python/grass/script/core.py", line 64, in
> __init__
>     subprocess.Popen.__init__(self, args, **kwargs)
>   File "/usr/lib/python2.7/subprocess.py", line 710, in __init__
>     errread, errwrite)
>   File "/usr/lib/python2.7/subprocess.py", line 1335, in _execute_child
>     raise child_exception
> OSError: [Errno 2] No such file or directory


So my question is whether there is a way to define addon dependencies, and
if there is not, what would be a sensible way to support something like
this.

best regards,
Panos
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-dev/attachments/20160204/b7301771/attachment.html>


More information about the grass-dev mailing list