Преглед на файлове

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 преди 11 години
родител
ревизия
6ab9469250
променени са 1 файла, в които са добавени 3 реда и са изтрити 1 реда
  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 -----------------------------------------------------