[GRASS-dev] Re: [GRASS-SVN] r40713 - grass/branches/develbranch_6/lib/gis

Glynn Clements glynn at gclements.plus.com
Thu Jan 28 08:50:30 EST 2010


Markus Neteler wrote:

> While backporting below, I found this unported change 6.5 -> 6.4:
> 
> @@ -1989,7 +1998,7 @@
> 
>      sprintf(script, "%s/etc/wxpython/gui_modules/menuform.py",
>  	    getenv("GISBASE"));
> -    G_spawn(getenv("GRASS_PYTHON"), "menuform.py", script, pgm_name, NULL);
> +    G_spawn(getenv("GRASS_PYTHON"), getenv("GRASS_PYTHON"), script,
> pgm_name, NULL);
>  }
> 
> Also backport?

May as well.

This is a workaround for a Gentoo bug. On Gentoo, "python" is a
launcher which invokes the "active" version of Python. Unfortunately,
it cares about argv[0].

The change causes the invocation to mirror normal execution of a
script from the shell (i.e. argv[0] is set to the name of the
interpreter).

Even without the change, the Gentoo bug can be worked around by
setting GRASS_PYTHON to the specific Python interpreter (e.g. 
"python2.6") rather than the launcher ("python").

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


More information about the grass-dev mailing list