pesekon2 / GRASS-GIS-SOS-tools

My Google Summer of Code 2017 project. This is just development part. Intended GRASS GIS modules and final code will be at https://svn.osgeo.org/grass/grass-addons/
GNU General Public License v2.0
3 stars 1 forks source link

Allow installation via g.extension #12

Closed ninsbl closed 7 years ago

ninsbl commented 7 years ago

Of course ths is nice to have, and no priority. It only makes it easier to test the module if it could be installed via g.extension.

g.extension allows to fetch modules from git...

Currently I get the following error message when I install from github:

g.extension extension=v.in.sos operation=add url=https://github.com/ninsbl/GRASS-GIS-SOS-tools
Fetching <v.in.sos> from <https://github.com/ninsbl/GRASS-GIS-SOS-tools/archive/master.zip> (be patient)...
Compiling...
make: *** No targets specified and no makefile found.  Stop.
ERROR: Compilation failed, sorry. Please check above error messages.
(Wed Jun 28 23:00:25 2017) Command finished (1 sec)

And if I clone the repository and install from local URL:

g.extension extension=v.in.sos operation=add url=/data/src/GRASS-GIS-SOS-tools/v.in.sos
Fetching <v.in.sos> from </data/src/GRASS-GIS-SOS-tools/v.in.sos> (be patient)...
Compiling...
Traceback (most recent call last):
  File "/tmp/grass7-stefan.blumentrath-8727/tmpgCgPGP/v.in.sos/scripts/v.in.sos", line 126, in <module>
    from xml2geojson import xml2geojson
ImportError: No module named xml2geojson
make: *** [v.in.sos.tmp.html] Error 1
ERROR: Compilation failed, sorry. Please check above error messages.
(Wed Jun 28 23:01:11 2017) Command finished (0 sec)
pesekon2 commented 7 years ago

I think there is a problem in v.in.sos with importing format_conversions where I have an absolute path here I wanted to incorporate those conversions into OWSLib but it doesn't seem to pan out. Don't you know about some GRASS library or something where we can try to incorporate it?

ninsbl commented 7 years ago

If integrating the format conversion into OWSlib is difficult or delayed, you might - at least temporarily - ship you module specific libs together with the module itself. If more *.in.sos use the format conversion you could do something like Matej did for wx.metadata, where he shipped CSW related python libs (in the mdlib dir) together with all wx.metadata modules. A makefile at first level would be also required, I guess...

lucadelu commented 7 years ago

@ninsbl you are right but we need to understand how we will distribute these modules.

I'm not sure that a package SOS could be the best solution, probably separated modules could be better, but at this point we need to understand how to provide these functions... I would prefer to see them in OWSLib, in the worst case we can put the in the GRASS python library.

However this issue is valid and we will deal with this at the end of GSOC.

lucadelu commented 7 years ago

@pesekon2 could you please write in GRASS-dev mailing list asking how you should add your project in GRASS-Addons?

lucadelu commented 7 years ago

now it is possible to compile the module (on Linux and Mac), going inside sos folder and running make MODULE_TOPDIR=/PATH/TO/YOUR/GRASS/INSTALLATION. If you have installed GRASS from binaries you have to install dev package (but I cannot be sure that it works)

pesekon2 commented 7 years ago

I have tried it in my GRASS installation and still the same problem with Html.Make, even with the dev package installed:

/usr/lib/grass73/include/Make/Html.make:14: recipe for target v.in.sos.tmp.html failed

(for all modules, not just v.in.sos)

But because it works on your machine, there must be some problem in my GRASS installation.

lucadelu commented 7 years ago

I tried to compile the modules using an installed GRASS version, using

sudo make MODULE_TOPDIR=/usr/lib/grass72

it works, this issue could be closed and when the modules will be finished we can move them to the GRASS addons repository.