#2895: Define dependencies for GRASS addons --------------------------+------------------------- Reporter: pmav99 | Owner: grass-dev@… Type: enhancement | Status: new Priority: normal | Milestone: 7.8.3 Component: Default | Version: unspecified Resolution: | Keywords: g.extension CPU: Unspecified | Platform: Unspecified --------------------------+-------------------------
Comment (by sbl): Replying to [comment:20 wenzeslaus]: > > Silently installing stuff can be a bit scary... > > Why do you think it is scary for GRASS GIS? pip, R, conda, apt, yum, ... all install dependencies of a package you asked for. Why this should not happen for GRASS GIS? Yes, you are right. So, how would we setup a requirements.txt? Should it contain different sections, like e.g. {{{ GRASS_addons r.area R_packages ggplot2 Python_libraries rpy2>=1.1 cmd_tools iconv cs2cs libraries libgdal-grass }}} Cause the way these dependencies are installed varies a bit, with a dpendency_check function for each of them... Maybe better with a dependency json: {{{ { "GRASS_addons": [ { "name": "r.area" }], "Python_libraries": [ { "name": "rpy2", "version": "1.1" "version_check": ">=" }], ... } }}} In the functions we might have to think about OS specific aspects (package manager (incl. conda vs. pip), library names) as well as maybe versions (e.g. numpy>=1.17). Also, should a failed dependency check block the installation? Because that it is not a trivial task I would opt for a warning rather than an error message in case of missing or unresolved dependencies... Lastly, should a dependency check function go into ''g.extension'' or into the python library (script or pygrass). In the python lib it could be used by AddOn devs at runtime (e.g. if it takes a json formated string or dict)... -- Ticket URL: <https://trac.osgeo.org/grass/ticket/2895#comment:21> GRASS GIS <https://grass.osgeo.org>
_______________________________________________ grass-dev mailing list grass-dev@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/grass-dev