[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 04:57:50 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 glynn):

 Replying to [comment:43 mmetz]:

 > 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.

 Correct. WinGRASS should assume Python, the same way that it does on
 Linux. On Linux, we don't install Python, we just assume that
 "#!/usr/bin/env python" will invoke a suitable Python interpreter. Windows
 doesn't use a shebang, it uses extensions, so on Windows, the assumption
 should be that the .py extension is associated with a suitable Python
 interpreter.

 > WinGRASS is currently compiled against osgeo4w python and related
 packages,

 WinGRASS isn't "compiled" against any version of 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?

 If the .py extension hasn't been associated with a Python interpreter,
 executing Python scripts won't work, with or with the .py extension.

 If we don't want to spend the rest of our lives adding one hack after
 another to deal with Python scripts on Windows, "executing" a Python
 script (via !CreateProcess(), system(), subprocess.Popen() or whatever)
 has to just work, which requires that the .py extension is associated with
 a working Python interpreter.

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



More information about the grass-dev mailing list