[GRASS-dev] [GRASS GIS] #580: WinGRASS: $GISBASE/etc/gui/scripts/ require something like $(EXE) to run

GRASS GIS trac at osgeo.org
Wed Aug 22 00:29:51 PDT 2012


#580: WinGRASS: $GISBASE/etc/gui/scripts/ require something like $(EXE) to run
---------------------------+------------------------------------------------
  Reporter:  hamish        |       Owner:  grass-dev@…              
      Type:  defect        |      Status:  reopened                 
  Priority:  blocker       |   Milestone:  7.0.0                    
 Component:  wxGUI         |     Version:  svn-trunk                
Resolution:                |    Keywords:  wingrass                 
  Platform:  MSWindows XP  |         Cpu:  Unspecified              
---------------------------+------------------------------------------------

Comment(by mmetz):

 Replying to [comment:42 glynn]:
 > Replying to [comment:41 martinl]:
 >
 > > just to sure what we want...
 > >
 > > python scripts should be executable from
 > >
 > >  1. cmd
 > >  2. msys
 > >  3. wxGUI
 >
 > In 7.0, MSys isn't required, and supporting it shouldn't be GRASS'
 responsibility (I don't know of any other Windows application which goes
 out of its way to support being used from MSys). If it is supported, it
 shouldn't be at the expense of native operation.
 >
 > > without need to define extension, eg.
 > >
 > {{{
 > g.manual
 > }}}
 > >
 > > should be possible to execute somehow. But AFAIU, in this case Windows
 doesn't know that python should be called, right?
 >
 > No, Windows supports this. Installing Python associates the .py
 extension with the Python interpreter.

 WinGRASS does not install python, nor numpy, scipy, or wxpython. These are
 all bundled with wingrass but not installed the Windows way. Therefore the
 system does not know that there is something like python.exe and the
 system does not know what to do with .py files. IIRC, a decision was made
 some time ago to not install python the Windows way together with wingrass
 because that could interfere with already installed python versions.

 WinGRASS is currently compiled against osgeo4w python and related
 packages, i.e. msys packages. It looks like that either wingrass installes
 python system-wide, the Windows way, or wingrass does not require a
 system-wide python and uses its own python, but then some .bat wrapper
 like

 {{{
 @"%GRASS_PYTHON%" "%GISBASE%/scripts/g.manual.py" %*
 }}}

 (see [comment:35 martinl]) would be needed. Is there another solution for
 the case that wingrass should work without a system-wide python?


 > Adding .PY to the PATHEXT environment variable allows Python scripts to
 be run without the extension (in the same way as .bat, .cmd, etc). That
 will work for anything which uses the shell (system(), Python's subprocess
 module, batch files, etc).

 Even if the system knows nothing about any python.exe?

 BTW, there is another strange side-effect. Addon scripts for GRASS 7 do
 not execute. Because of a some ugly hack it is possible to get the GUI for
 an addon script (--interface-description works), but clicking on run
 returns an error that the module is not found. This happens on some, not
 all windows systems.

 Markus M

-- 
Ticket URL: <https://trac.osgeo.org/grass/ticket/580#comment:43>
GRASS GIS <http://grass.osgeo.org>



More information about the grass-dev mailing list