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

GRASS GIS trac at osgeo.org
Tue Mar 20 02:03:15 EDT 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 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. 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).

 MSys doesn't use extensions, it uses the shebang. Moreover, it generally
 does a poor job of interacting with native Windows programs. It was
 created to support Unix-style build systems (i.e. configure scripts and
 Unix Makefiles), and tends to be something of a walled garden. But unlike
 Cygwin, it isn't consistent. Whereas Cygwin uses Unix semantics (Unix-
 style pathnames, shebang) both in the shell and in executables, MSys uses
 Unix semantics in the shell but the executables use MSVCRT, which uses
 Windows semantics. It tries to automatically convert filenames, but only
 when passed as command-line arguments (and in a few specific environment
 variables, e.g. PATH). Passing filenames via files, pipes, other
 environment variables, etc requires conversions to be performed manually.

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



More information about the grass-dev mailing list