Hi,
I am trying to fix `build_modules_xml.py` to produces description also
for Python modules. The problem is the failure in grass.script's
get_interface_description() [1] caused by two issues. When running the
script from Makefile [2], the PATHEXT variable can miss '.py'
extension (for running session it's set up by grass.py [3]. I have
fixed this issue in r59338.
The _remaining_ issue is related to Makefiles. Strangely the rule [4]
produces _doubled_ PATH, on Windows it's cased by LD_LIBRARY_PATH
which overwrites manually defined PATH:
GISRC=/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-mingw32/demolocation/.grassrc70
GISBASE=c:/osgeo4w/usr/src/grass_trunk/dist.i686-pc-mingw32
--> PATH="/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-mingw32/bin:/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-mingw32/bin:/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-mingw32/scripts:
$PATH"
PYTHONPATH="c:/osgeo4w/usr/src/grass_trunk/dist.i686-pc-mingw32/etc/python;c:/osgeo4w/usr/src/grass_trunk/dist.i686-pc-mingw32/etc/python;$PYTHONPATH"
--> PATH="/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-mingw32/bin:/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-mingw32/scripts:/c/osgeo4w/usr/src/grass_trunk/dist.i686
-pc-mingw32/lib:/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-mingw32/lib:.:/usr/local/bin:/mingw/bin:/bin:/osgeo4w/bin:/c/Windows/system32:/c/Windows:/c/Windows/
WBem:/usr/bin:/osgeo4w/apps/Python27/Scripts"
LC_ALL=C python tools/build_modules_xml.py >
/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-mingw32/etc/gui/wxpython/
The result is that `$GISBASE/scripts` is not in the path and
get_interface() fails. Does anybody have an idea how to correctly fix
`run_grass` rule. If I add `$GISBASE/scripts` to LD_LIBRARY_PATH
manually, it starts to work.
Thanks for any idea in advance, Martin
[1] http://trac.osgeo.org/grass/browser/grass/trunk/lib/python/script/task.py#L455
[2] http://trac.osgeo.org/grass/browser/grass/trunk/gui/wxpython/Makefile#L53
[3] http://trac.osgeo.org/grass/browser/grass/trunk/lib/init/grass.py#L418
[4] http://trac.osgeo.org/grass/browser/grass/trunk/include/Make/Rules.make#L33
--
Martin Landa * http://geo.fsv.cvut.cz/gwiki/Landa
Thanks, your analyses seems very deep. It would be incredibly useful if somebody would solve this issue since it might fix also compilation on some Macs (#1819), for Ubuntu PPA and some other less usual configurations.
Vaclav
https://trac.osgeo.org/grass/ticket/1819
···
On Tue, Mar 25, 2014 at 2:54 PM, Martin Landa <landa.martin@gmail.com> wrote:
Hi,
I am trying to fix build_modules_xml.py
to produces description also
for Python modules. The problem is the failure in grass.script’s
get_interface_description() [1] caused by two issues. When running the
script from Makefile [2], the PATHEXT variable can miss ‘.py’
extension (for running session it’s set up by grass.py [3]. I have
fixed this issue in r59338.
The remaining issue is related to Makefiles. Strangely the rule [4]
produces doubled PATH, on Windows it’s cased by LD_LIBRARY_PATH
which overwrites manually defined PATH:
GISRC=/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-mingw32/demolocation/.grassrc70
GISBASE=c:/osgeo4w/usr/src/grass_trunk/dist.i686-pc-mingw32
→ PATH=“/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-mingw32/bin:/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-mingw32/bin:/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-mingw32/scripts:
$PATH”
PYTHONPATH=“c:/osgeo4w/usr/src/grass_trunk/dist.i686-pc-mingw32/etc/python;c:/osgeo4w/usr/src/grass_trunk/dist.i686-pc-mingw32/etc/python;$PYTHONPATH”
→ PATH=“/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-mingw32/bin:/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-mingw32/scripts:/c/osgeo4w/usr/src/grass_trunk/dist.i686
-pc-mingw32/lib:/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-mingw32/lib:.:/usr/local/bin:/mingw/bin:/bin:/osgeo4w/bin:/c/Windows/system32:/c/Windows:/c/Windows/
WBem:/usr/bin:/osgeo4w/apps/Python27/Scripts”
LC_ALL=C python tools/build_modules_xml.py >
/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-mingw32/etc/gui/wxpython/
The result is that $GISBASE/scripts
is not in the path and
get_interface() fails. Does anybody have an idea how to correctly fix
run_grass
rule. If I add $GISBASE/scripts
to LD_LIBRARY_PATH
manually, it starts to work.
Thanks for any idea in advance, Martin
[1] http://trac.osgeo.org/grass/browser/grass/trunk/lib/python/script/task.py#L455
[2] http://trac.osgeo.org/grass/browser/grass/trunk/gui/wxpython/Makefile#L53
[3] http://trac.osgeo.org/grass/browser/grass/trunk/lib/init/grass.py#L418
[4] http://trac.osgeo.org/grass/browser/grass/trunk/include/Make/Rules.make#L33
–
Martin Landa * http://geo.fsv.cvut.cz/gwiki/Landa
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev
For the record:
r59485
modify Rules.make to fix build_modules_xml.py on Windows (TODO: replace this workaround)
https://trac.osgeo.org/grass/changeset/59485
···
On Wed, Mar 26, 2014 at 4:47 PM, Vaclav Petras <wenzeslaus@gmail.com> wrote:
Thanks, your analyses seems very deep. It would be incredibly useful if somebody would solve this issue since it might fix also compilation on some Macs (#1819), for Ubuntu PPA and some other less usual configurations.
Vaclav
https://trac.osgeo.org/grass/ticket/1819
On Tue, Mar 25, 2014 at 2:54 PM, Martin Landa <landa.martin@gmail.com> wrote:
Hi,
I am trying to fix build_modules_xml.py
to produces description also
for Python modules. The problem is the failure in grass.script’s
get_interface_description() [1] caused by two issues. When running the
script from Makefile [2], the PATHEXT variable can miss ‘.py’
extension (for running session it’s set up by grass.py [3]. I have
fixed this issue in r59338.
The remaining issue is related to Makefiles. Strangely the rule [4]
produces doubled PATH, on Windows it’s cased by LD_LIBRARY_PATH
which overwrites manually defined PATH:
GISRC=/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-mingw32/demolocation/.grassrc70
GISBASE=c:/osgeo4w/usr/src/grass_trunk/dist.i686-pc-mingw32
→ PATH=“/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-mingw32/bin:/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-mingw32/bin:/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-mingw32/scripts:
$PATH”
PYTHONPATH=“c:/osgeo4w/usr/src/grass_trunk/dist.i686-pc-mingw32/etc/python;c:/osgeo4w/usr/src/grass_trunk/dist.i686-pc-mingw32/etc/python;$PYTHONPATH”
→ PATH=“/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-mingw32/bin:/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-mingw32/scripts:/c/osgeo4w/usr/src/grass_trunk/dist.i686
-pc-mingw32/lib:/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-mingw32/lib:.:/usr/local/bin:/mingw/bin:/bin:/osgeo4w/bin:/c/Windows/system32:/c/Windows:/c/Windows/
WBem:/usr/bin:/osgeo4w/apps/Python27/Scripts”
LC_ALL=C python tools/build_modules_xml.py >
/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-mingw32/etc/gui/wxpython/
The result is that $GISBASE/scripts
is not in the path and
get_interface() fails. Does anybody have an idea how to correctly fix
run_grass
rule. If I add $GISBASE/scripts
to LD_LIBRARY_PATH
manually, it starts to work.
Thanks for any idea in advance, Martin
[1] http://trac.osgeo.org/grass/browser/grass/trunk/lib/python/script/task.py#L455
[2] http://trac.osgeo.org/grass/browser/grass/trunk/gui/wxpython/Makefile#L53
[3] http://trac.osgeo.org/grass/browser/grass/trunk/lib/init/grass.py#L418
[4] http://trac.osgeo.org/grass/browser/grass/trunk/include/Make/Rules.make#L33
–
Martin Landa * http://geo.fsv.cvut.cz/gwiki/Landa
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev
Hi,
2014-04-02 16:45 GMT+02:00 Vaclav Petras <wenzeslaus@gmail.com>:
For the record:
r59485
modify Rules.make to fix build_modules_xml.py on Windows (TODO: replace this workaround)
https://trac.osgeo.org/grass/changeset/59485
right, is there anybody who has idea how to fix it in better way? Thanks, Martin