[GRASS-windows] r.basin for windows [was Re: WinGrass6.5.svn-installer with selected addons]

Glynn Clements glynn at gclements.plus.com
Fri Oct 14 08:27:45 EDT 2011


Margherita Di Leo wrote:

> > > any ideas? I don't know if python-scripts are recognised correctly in
> > > build
> > > process.
> >
> > They aren't.
> >
> > And the rules can't simply be back-ported from 7.0 because 7.0's
> > Script.make only works for Python scripts, not for shell scripts.
> 
> Sorry I am a bit confused. If I understand, there is no way to compile any
> python script on grass 6 series? Is that related to windows or is platform
> independent?

It isn't platform-specific. The 6.x build system has no support for
Python scripts.

The 6.x build system assumes that scripts are shell scripts. The
"script" target defined by Script.make will attempt to install $(PGM)
as $(ARCH_DISTDIR)/scripts/$(PGM). Also, the rule used to make the
HTML file doesn't set PYTHONPATH, so if a Python script imports e.g. 
grass.script, the import will fail. Also, on Windows it will create a
.bat file which invokes the script via $GRASS_SH (which won't work for
Python scripts).

In 7.0, the "script" target will attempt to install $(PGM).py as
either $(ARCH_DISTDIR)/scripts/$(PGM) (on Unix) or
$(ARCH_DISTDIR)/scripts/$(PGM).py (on Windows, as Windows uses the
extension rather than the #! line to determine how to "execute" a
script). And it will set PYTHONPATH when running a command to generate
its HTML file.

> I tried to compile r.basin on debian and I do have problems as well. I would
> have bet that it was working when i committed it, but I'm not sure at this
> point.
> But.. could it be a problem in the makefile? I'm not sure I wrote it
> correctly. Please could anyone more experienced than me give a look at it?

That won't work, because no file named "r.basin" exists in the
directory.

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


More information about the grass-windows mailing list