[GRASS-dev] GRASS6.4 Ptyhon scripts- module

Markus Neteler neteler at osgeo.org
Wed Jul 28 06:07:01 EDT 2010


On Wed, Jul 28, 2010 at 5:35 AM, Glynn Clements
<glynn at gclements.plus.com> wrote:
>
> Markus Neteler wrote:
>
>> >>  > 6.4 has the Python modules, but the build system doesn't support
>> >>  > Python scripts (it doesn't set PYTHONPATH when executing commands).
>> >>
>> >> What does this means? That I won't be able to run Python Scripts in 6.4?
>> >
>> > You can run a Python script once you've managed to install it, but you
>> > can't just drop it into the source tree, as the 6.x build system
>> > doesn't support Python scripts.
>>
>> what is missing - any pointers?
>
> The handling of scripts is entirely different between 6.x and 7.0.
>
> In 6.x, a script is "made" by installing a file of the same name from
> the current directory to the scripts directory. On Windows, a
> corresponding .bat file is also generated.
>
> In 7.0, the target script has a .py extension on Windows but not on
> other platforms. The source script always has a .py suffix. Shell
> scripts aren't supported.
>
> If you want to include Python scripts in 6.x, the Makefile would need
> to provide the necessary rules; there isn't anything in *.make (in
> either 6.x or 7.0) which will help.

I suspect that it would be a clone of
include/Make/Script.make
adapted to Python with a new target
default: python

?,
Markus


More information about the grass-dev mailing list