[GRASS-SVN] r59943 - grass/trunk/lib/python/pygrass/docs
svn_grass at osgeo.org
svn_grass at osgeo.org
Sat Apr 26 05:22:02 PDT 2014
Author: martinl
Date: 2014-04-26 05:22:02 -0700 (Sat, 26 Apr 2014)
New Revision: 59943
Modified:
grass/trunk/lib/python/pygrass/docs/conf.py
Log:
fix pygrass conf.py to import modules correctly (requires GISBASE to be defined)
Modified: grass/trunk/lib/python/pygrass/docs/conf.py
===================================================================
--- grass/trunk/lib/python/pygrass/docs/conf.py 2014-04-25 13:03:15 UTC (rev 59942)
+++ grass/trunk/lib/python/pygrass/docs/conf.py 2014-04-26 12:22:02 UTC (rev 59943)
@@ -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