[GRASS-dev] [GRASS-SVN] r60870 - grass/trunk/lib/python/script

Hi Glynn,

is this a backport to relbr7 candidate?

On Thu, Jun 19, 2014 at 4:35 PM, <svn_grass@osgeo.org> wrote:

Author: glynn
Date: 2014-06-19 07:35:05 -0700 (Thu, 19 Jun 2014)
New Revision: 60870

Modified:
   grass/trunk/lib/python/script/core.py
Log:
Use subprocess.Popen() directly for calling g.parser

Modified: grass/trunk/lib/python/script/core.py

--- grass/trunk/lib/python/script/core.py 2014-06-18 19:59:38 UTC (rev 60869)
+++ grass/trunk/lib/python/script/core.py 2014-06-19 14:35:05 UTC (rev 60870)
@@ -644,7 +644,8 @@
         else:
             argv[0] = os.path.join(sys.path[0], name)

- p = Popen(['g.parser', '-n'] + argv, stdout=PIPE)
+ prog = "g.parser.exe" if sys.platform == "win32" else "g.parser"
+ p = subprocess.Popen([prog, '-n'] + argv, stdout=subprocess.PIPE)
     s = p.communicate()[0]
     lines = s.split('\0')

thanks
Markus

Hi,

2014-06-20 16:07 GMT+02:00 Markus Neteler <neteler@osgeo.org>:

is this a backport to relbr7 candidate?

not really, it's one of many steps which need to be done after
disabling shell on Windows [1]. Compilation still fails [2].

Martin

[1] http://trac.osgeo.org/grass/changeset/60679/grass/trunk/lib/python/script/core.py
[2] http://wingrass.fsv.cvut.cz/grass71/logs/log-r60875-997/package.log

Martin Landa wrote:

Compilation still fails [2].

[2] http://wingrass.fsv.cvut.cz/grass71/logs/log-r60875-997/package.log

Note that there are no longer any compilation failures for the scripts
directory, only for temporal and wxGUI.

The compilation failures in temporal are a consequence of
lib/python/pygrass/gis/__init__.py calling grass.script.gisenv() at
the top level, which it shouldn't be doing.

--
Glynn Clements <glynn@gclements.plus.com>

Hi Glynn,

On Sat, Jun 21, 2014 at 2:27 AM, Glynn Clements
<glynn@gclements.plus.com> wrote:

Compilation still fails [2].

[2] http://wingrass.fsv.cvut.cz/grass71/logs/log-r60875-997/package.log

Note that there are no longer any compilation failures for the scripts
directory, only for temporal and wxGUI.

The compilation failures in temporal are a consequence of
lib/python/pygrass/gis/__init__.py calling grass.script.gisenv() at
the top level, which it shouldn't be doing.

Thanks to pointed out this! It was my fault sorry for that.
Removed in r60909

Pietro