[QGIS Commit] r10814 - trunk/qgis/src/providers/grass

svn_qgis at osgeo.org svn_qgis at osgeo.org
Mon May 18 06:02:31 EDT 2009


Author: rblazek
Date: 2009-05-18 06:02:31 -0400 (Mon, 18 May 2009)
New Revision: 10814

Modified:
   trunk/qgis/src/providers/grass/qgsgrass.cpp
Log:
additional fix for #1173, missing PYTHON path

Modified: trunk/qgis/src/providers/grass/qgsgrass.cpp
===================================================================
--- trunk/qgis/src/providers/grass/qgsgrass.cpp	2009-05-18 09:34:29 UTC (rev 10813)
+++ trunk/qgis/src/providers/grass/qgsgrass.cpp	2009-05-18 10:02:31 UTC (rev 10814)
@@ -205,6 +205,15 @@
   strcpy( pathEnvChar, path.toAscii().constData() );
   putenv( pathEnvChar );
 
+  // Set PYTHONPATH
+  QString pythonpath = "PYTHONPATH=" + gisBase + "/etc/python";
+  QString pp = getenv( "PATH" );
+  pythonpath.append( sep + pp );
+  QgsDebugMsg( QString( "set PYTHONPATH: %1" ).arg( pythonpath ) );
+  char *pythonpathEnvChar = new char[pythonpath.length()+1];
+  strcpy( pythonpathEnvChar, pythonpath.toAscii().constData() );
+  putenv( pythonpathEnvChar );
+
   // Set GRASS_PAGER if not set, it is necessary for some
   // modules printing to terminal, e.g. g.list
   // We use 'cat' because 'more' is not present in MSYS (Win)



More information about the QGIS-commit mailing list