[GRASS-SVN] r46770 - grass/branches/develbranch_6/lib/python

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Jun 23 16:16:52 EDT 2011


Author: martinl
Date: 2011-06-23 13:16:52 -0700 (Thu, 23 Jun 2011)
New Revision: 46770

Modified:
   grass/branches/develbranch_6/lib/python/setup.py.sed
Log:
pythonlib: Set PYTHONPATH to find GRASS Python modules
          (merge r46768 from trunk)


Modified: grass/branches/develbranch_6/lib/python/setup.py.sed
===================================================================
--- grass/branches/develbranch_6/lib/python/setup.py.sed	2011-06-23 19:53:44 UTC (rev 46769)
+++ grass/branches/develbranch_6/lib/python/setup.py.sed	2011-06-23 20:16:52 UTC (rev 46770)
@@ -44,6 +44,15 @@
     
     os.environ['GIS_LOCK'] = str(os.getpid())
     
+    # Set PYTHONPATH to find GRASS Python modules
+    path = os.getenv('PYTHONPATH')
+    dir  = os.path.join(gisbase, 'etc', 'python')
+    if path:
+	path = dir + os.pathsep + path
+    else:
+	path = dir
+    os.environ['PYTHONPATH'] = path
+    
     if not dbase:
         dbase = gisbase
     
@@ -55,4 +64,3 @@
     os.close(fd)
     
     return gisrc
-



More information about the grass-commit mailing list