[GRASS-dev] Python script dependencies

Stefan Blumentrath Stefan.Blumentrath at nina.no
Wed Oct 24 01:03:58 PDT 2018

Good point!
Added two bullet-points here: https://trac.osgeo.org/grass/wiki/Submitting


From: Michel Wortmann <wortmann at pik-potsdam.de>
Sent: tirsdag 23. oktober 2018 13:27
To: Stefan Blumentrath <Stefan.Blumentrath at nina.no>
Cc: grass-dev <grass-dev at lists.osgeo.org>
Subject: Re: [GRASS-dev] Python script dependencies

Great, thanks Stefan!
I find those standard Makefiles deserve a mention in the GRASS and Python documentation somewhere.


On 23 Oct 2018, at 11:25, Stefan Blumentrath <Stefan.Blumentrath at nina.no<mailto:Stefan.Blumentrath at nina.no>> wrote:

Hi Michael,

Have a look at e.g.https://github.com/pesekon2/GRASS-GIS-SOS-tools/tree/master/sos or
for inspiration regarding addon-libraries (in Python).

Kind regards,

From: grass-dev <grass-dev-bounces at lists.osgeo.org<mailto:grass-dev-bounces at lists.osgeo.org>> On Behalf Of Michel Wortmann
Sent: tirsdag 23. oktober 2018 11:20
To: grass-dev <grass-dev at lists.osgeo.org<mailto:grass-dev at lists.osgeo.org>>
Subject: [GRASS-dev] Python script dependencies

Hi team,

I have some python modules developed in a toolbox and install them all using g.extension with the SUBDIRS Makefile variable. I frequently feel like I need to share code between those modules, i.e. I would like to create a utility module that can be imported by all other modules in the toolbox. I managed to install the module in the .grass7/addons/script directory, but the installation of the other modules fails because they cant import the utilities yet. Installing it like any other module seems to bring all sorts of problems including the requirement to include the toolbox name that has dots in them preventing a python import.

How would I best go about this?

Thanks a lot,

* Michel Wortmann
* Post-doc
* Potsdam Institute for Climate Impact Research (PIK)
* Telegrafenberg  A62,  14473 Potsdam, Germany
* Tel.:  0049 (0)331 288 2546
* E-mail: wortmann at pik-potsdam.de<mailto:wortmann at pik-potsdam.de>
* Internet: www.pik-potsdam.de/members/wortmann<http://www.pik-potsdam.de/members/wortmann>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-dev/attachments/20181024/5c99c9c3/attachment-0001.html>

More information about the grass-dev mailing list