File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -205,6 +205,15 @@ void GRASS_EXPORT QgsGrass::init( void )
205
205
strcpy ( pathEnvChar, path.toAscii ().constData () );
206
206
putenv ( pathEnvChar );
207
207
208
+ // Set PYTHONPATH
209
+ QString pythonpath = " PYTHONPATH=" + gisBase + " /etc/python" ;
210
+ QString pp = getenv ( " PATH" );
211
+ pythonpath.append ( sep + pp );
212
+ QgsDebugMsg ( QString ( " set PYTHONPATH: %1" ).arg ( pythonpath ) );
213
+ char *pythonpathEnvChar = new char [pythonpath.length ()+1 ];
214
+ strcpy ( pythonpathEnvChar, pythonpath.toAscii ().constData () );
215
+ putenv ( pythonpathEnvChar );
216
+
208
217
// Set GRASS_PAGER if not set, it is necessary for some
209
218
// modules printing to terminal, e.g. g.list
210
219
// We use 'cat' because 'more' is not present in MSYS (Win)
You can’t perform that action at this time.
0 commit comments