[GRASS-SVN] r67288 - grass/trunk/lib/python/script
svn_grass at osgeo.org
svn_grass at osgeo.org
Sun Dec 20 14:09:47 PST 2015
Author: martinl
Date: 2015-12-20 14:09:47 -0800 (Sun, 20 Dec 2015)
New Revision: 67288
Modified:
grass/trunk/lib/python/script/setup.py
Log:
libpython/setup: define also GRASS_PYTHON if not defined
Modified: grass/trunk/lib/python/script/setup.py
===================================================================
--- grass/trunk/lib/python/script/setup.py 2015-12-20 21:18:44 UTC (rev 67287)
+++ grass/trunk/lib/python/script/setup.py 2015-12-20 22:09:47 UTC (rev 67288)
@@ -171,8 +171,13 @@
os.environ['GIS_LOCK'] = str(os.getpid())
- # Set PYTHONPATH to find GRASS Python modules
- # TODO: isn't this useless? user already imported this somehow
+ # Set GRASS_PYTHON and PYTHONPATH to find GRASS Python modules
+ if not os.getenv('GRASS_PYTHON'):
+ if sys.platform == 'win32':
+ os.environ['GRASS_PYTHON'] = "python.exe"
+ else:
+ os.environ['GRASS_PYTHON'] = "python"
+
path = os.getenv('PYTHONPATH')
etcpy = os.path.join(gisbase, 'etc', 'python') + os.pathsep + os.path.join(gisbase, 'gui', 'wxpython')
if path:
More information about the grass-commit
mailing list