Explorar o código

fix pygrass conf.py to import modules correctly (requires GISBASE to be defined)

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@59943 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa %!s(int64=11) %!d(string=hai) anos
pai
achega
6ab9469250
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      lib/python/pygrass/docs/conf.py

+ 3 - 1
lib/python/pygrass/docs/conf.py

@@ -16,7 +16,9 @@ import sys, os
 # If extensions (or modules to document with autodoc) are in another directory,
 # add these directories to sys.path here. If the directory is relative to the
 # documentation root, use os.path.abspath to make it absolute, like shown here.
-sys.path.insert(0, os.path.abspath('../src/'))
+if not os.getenv('GISBASE'):
+    sys.exit("GISBASE not defined")
+sys.path.insert(0, os.path.abspath(os.path.join(os.environ['GISBASE'], 'etc', 'python', 'grass')))
 
 # -- General configuration -----------------------------------------------------