Skip to content

Commit f0f6c17

Browse files
author
rblazek
committed
additional fix for #1173, missing PYTHON path
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@10814 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent c3f1137 commit f0f6c17

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/providers/grass/qgsgrass.cpp

+9
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,15 @@ void GRASS_EXPORT QgsGrass::init( void )
205205
strcpy( pathEnvChar, path.toAscii().constData() );
206206
putenv( pathEnvChar );
207207

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+
208217
// Set GRASS_PAGER if not set, it is necessary for some
209218
// modules printing to terminal, e.g. g.list
210219
// We use 'cat' because 'more' is not present in MSYS (Win)

0 commit comments

Comments
 (0)