Skip to content
Permalink
Browse files

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
rblazek committed May 18, 2009
1 parent c3f1137 commit f0f6c177ae3c174d9400526859b697f76db07635
Showing with 9 additions and 0 deletions.
  1. +9 −0 src/providers/grass/qgsgrass.cpp
@@ -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)

0 comments on commit f0f6c17

Please sign in to comment.
You can’t perform that action at this time.