[GRASS-SVN] r59944 - grass/branches/releasebranch_7_0/lib/python/pygrass/docs

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Apr 26 05:28:04 PDT 2014


Author: martinl
Date: 2014-04-26 05:28:04 -0700 (Sat, 26 Apr 2014)
New Revision: 59944

Modified:
   grass/branches/releasebranch_7_0/lib/python/pygrass/docs/conf.py
Log:
fix pygrass conf.py to import modules correctly (requires GISBASE to be defined)
    (merge r59943 from trunk)


Modified: grass/branches/releasebranch_7_0/lib/python/pygrass/docs/conf.py
===================================================================
--- grass/branches/releasebranch_7_0/lib/python/pygrass/docs/conf.py	2014-04-26 12:22:02 UTC (rev 59943)
+++ grass/branches/releasebranch_7_0/lib/python/pygrass/docs/conf.py	2014-04-26 12:28:04 UTC (rev 59944)
@@ -16,7 +16,9 @@
 # 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 -----------------------------------------------------
 



More information about the grass-commit mailing list