Colin Nielsen wrote:
> I suspect that Python wants PYTHONPATH to use Windows syntax, e.g.
> (untested):
>
> - PYTHONPATH="$(GISBASE)/etc/python:$$PYTHONPATH" \
> + PYTHONPATH="$(call mkpath,$(GISBASE)/etc/python,$$PYTHONPATH)" \
> +
> +ifneq ($(MINGW32),)
> +mkpath = $(shell g.dirseps -h $(1))\;$(2)
> +else
> +mkpath = $(1):$(2)
> +endifI applied this to the Html.make file and tried again. I got:
[snip]
If you apply the above as-is, you will get this error. The htmldesc=
definition needs to be a contiguous block, and the ifneq...endif block
needs to follow it.
I have attached a complete, modified Html.make file to avoid
confusion. This has at least been tested on Linux.
I then checked the variable PYTHONPATH and found that my Arc
installation over-wrote the PYTHONPATH variable to its own folder. I
changed this back to /usr/local/src/grass_trunk/lib/Python and ran it
again (with the original Html.make) and got:
os.execvp("g.parser", [name] + argv)
File "C:\MinGW\Python\lib\os.py", line 353, in execvp
_execvpe(file, args)
File "C:\MinGW\Python\lib\os.py", line 389, in _execvpe
func(fullname, *argrest)
OSError: [Errno 2] No such file or directory
Ugh. I suspect os.execvp() needs "g.parser.exe" rather than
"g.parser". On Windows, only the higher-level interfaces (e.g.
ShellExecute() or "cmd /c ...") allow the .exe (or .bat etc) extension
to be omitted.
On Windows, we might want to use subprocess.Popen(shell=True) followed
by sys.exit() instead of os.execvp().
Before I continue with this, is this some peculiarity with my
installation or a more general problem with grass7 on mingw/msys?
The latter.
7.0 is quite fluid, and it doesn't seem to be getting much testing on
Windows (6.x doesn't get much testing either, but then 6.x isn't being
substantially rewritten).
--
Glynn Clements <glynn@gclements.plus.com>
(attachments)
Html.make (1.01 KB)