[GRASS-SVN] r67289 - grass/branches/releasebranch_7_0/lib/python/script
svn_grass at osgeo.org
svn_grass at osgeo.org
Sun Dec 20 14:13:08 PST 2015
Author: martinl
Date: 2015-12-20 14:13:07 -0800 (Sun, 20 Dec 2015)
New Revision: 67289
Modified:
grass/branches/releasebranch_7_0/lib/python/script/setup.py
Log:
libpython/setup: define also GRASS_PYTHON if not defined
(merge r67288 from trunk)
Modified: grass/branches/releasebranch_7_0/lib/python/script/setup.py
===================================================================
--- grass/branches/releasebranch_7_0/lib/python/script/setup.py 2015-12-20 22:09:47 UTC (rev 67288)
+++ grass/branches/releasebranch_7_0/lib/python/script/setup.py 2015-12-20 22:13:07 UTC (rev 67289)
@@ -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')
if path:
More information about the grass-commit
mailing list