瀏覽代碼

libpython/set_path(): fix compilation of some addons, see https://trac.osgeo.org/grass/ticket/2968

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@68156 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 9 年之前
父節點
當前提交
e32138e360
共有 1 個文件被更改,包括 7 次插入0 次删除
  1. 7 0
      lib/python/script/utils.py

+ 7 - 0
lib/python/script/utils.py

@@ -291,6 +291,13 @@ def get_lib_path(modname, libname=None):
         path = '{cwd}{sep}etc{sep}{modname}'.format(cwd=cwd[:idx+len(modname)],
                                                     sep=sep,
                                                     modname=modname)
+        if libname:
+            path += '{pathsep}{cwd}{sep}etc{sep}{modname}{sep}{libname}'.format(
+                cwd=cwd[:idx+len(modname)],
+                sep=sep,
+                modname=modname, libname=libname,
+                pathsep=os.pathsep
+            )
     
     return path