[GRASS-dev] Installing own Python script

Pierre Roudier pierre.roudier at gmail.com
Tue May 31 18:10:39 EDT 2011


Hi Glynn,

> The build system merges the --html-description output with the
> <module>.html file (unless the <module>.html file contains an <html>
> tag, in which case it is used verbatim; this is intended for modules
> which don't recognise the --html-description switch, e.g. g.parser).
>
> Look at the <module>.html files for existing scripts for reference.
> They start with the DESCRIPTION section.

Indeed, my bad - I did looked into it, but did not realized that.

> If you're actively developing GRASS, you wouldn't normally install it.
> Just run it using the bin.<arch>/grass70 script. This will set the
> environment variables (GISBASE, PATH, etc) to use the version in the
> dist.<arch> staging directory.
>
> Running "make" in a module/script/library/etc directory places the
> resulting files in the staging directory. If you're running GRASS from
> the staging directory, subsequent commands will used the updated
> files.
>
> Running "make install" from the top level just copies the whole of
> dist.<arch> to the installation directory (e.g. /usr/local/grass70)
> and bin.<arch>/grass70 to the bin directory (e.g. /usr/local/bin), and
> fixes any embedded paths in scripts and configuration files.
>

Thanks Glynn, this is all working!

> The per-module "install" target (which doesn't exist for scripts at
> present) copies a single module (along with its manual page in HTML
> and man formats) from the dist.<arch> directory to the installation
> directory.
>
> AFAICT, this is only useful if you're pushing your changes into the
> installed version so frequently that having to do a full "make install"
> from the top level each time would actually be a problem.

Which could be interesting when developing that module/script? But for
the time being, I'll use the "make on script directory"+"make install
in the top dir" approach.

Thanks heaps. Should that be on a wiki page somewhere?

Pierre

-- 
Scientist
Landcare Research, New Zealand


More information about the grass-dev mailing list