Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
additional fix for #1173, missing PYTHON path
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@10814 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
rblazek committed May 18, 2009
1 parent c3f1137 commit f0f6c17
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/providers/grass/qgsgrass.cpp
Expand Up @@ -205,6 +205,15 @@ void GRASS_EXPORT QgsGrass::init( void )
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)
Expand Down

0 comments on commit f0f6c17

Please sign in to comment.