[GRASS-SVN] r46769 - grass/branches/releasebranch_6_4/lib/python

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Jun 23 15:53:44 EDT 2011


Author: martinl
Date: 2011-06-23 12:53:44 -0700 (Thu, 23 Jun 2011)
New Revision: 46769

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


Modified: grass/branches/releasebranch_6_4/lib/python/setup.py.sed
===================================================================
--- grass/branches/releasebranch_6_4/lib/python/setup.py.sed	2011-06-23 19:45:19 UTC (rev 46768)
+++ grass/branches/releasebranch_6_4/lib/python/setup.py.sed	2011-06-23 19:53:44 UTC (rev 46769)
@@ -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