Selaa lähdekoodia

pygrass: fix set_path() when compiling g.gui.mwprecip addons (GRASS installed from package)

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@67537 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 9 vuotta sitten
vanhempi
commit
17a8130196
1 muutettua tiedostoa jossa 6 lisäystä ja 1 poistoa
  1. 6 1
      lib/python/pygrass/utils.py

+ 6 - 1
lib/python/pygrass/utils.py

@@ -300,10 +300,15 @@ def get_lib_path(modname, libname=None):
     elif getenv('GRASS_ADDON_BASE') and \
             isdir(join(getenv('GRASS_ADDON_BASE'), modname, modname)):
         path = join(os.getenv('GRASS_ADDON_BASE'), modname, modname)
-    elif libname and isdir(join('..', libname)):
+    elif libname and isdir(join('..', libname)): # used by g.extension compilation process
         path = join('..', libname)
+    elif isdir(join('..', 'etc', modname)):      # used by g.extension compilation process
+        path = join('..', 'etc', modname)
+    elif isdir(join('etc', modname)):            # used by g.extension compilation process
+        path = join('etc', modname)
     else:
         path = None
+    
     return path