other versions
- jessie 6.4.4-1
- stretch 7.2.0-2
- testing 7.6.0-1
- unstable 7.6.0-1
- experimental 7.6.1-1~exp1
g.extension(1grass) | Grass User's Manual | g.extension(1grass) |
NAME¶
g.extension - Tool to maintain GRASS extensions in local GRASS installation.KEYWORDS¶
general, extensionsSYNOPSIS¶
g.extensionFlags:¶
- -l
-
- -s
-
- -u
-
- --verbose
-
- --quiet
-
Parameters:¶
- extension=name
-
- operation=name
-
- svnurl=url
-
- prefix=path
-
DESCRIPTION¶
g.extension downloads community contributed addon modules from the GRASS-addons Subversion repository (SVN) and installs them on the local system. These include modules providing specialist functionality, modules in development and beta testing, newly proposed modules, experimental modules, and simple helper scripts. There are additional code contributions in the SVN repository which are either incomplete or complex to install and so not available through g.extension. The addons repository acts in part as an incubation area, so the code there may not be as polished and well reviewed as the core GRASS modules, or it may not even work at all. All code is license-compatible with GRASS and can be used, shared, and modified under the same Free-software terms. You are both welcome and encouraged to contribute your own scripts there, and so make them available via g.extension, if you feel they would be useful to others. Re-running the script for an installed GRASS addon module re-installs the requested extension. This is a handy way to apply updates or rebuild compiled modules after installing a new version of GRASS. The default action is to install the files into the first directory listed in the GRASS_ADDON_PATH environment variable. If that has not been set it will default to ~/.grass6/addons/ on UNIX or %APPDATA%\GRASS6\addons on MS Windows. With suitable administrative permissions you can optionally install directly into the main GRASS program directory ($GISBASE).NOTES¶
The wxGUI contains a graphical extension manager separate to this version of g.extension. The wxGUI Extension Manager can be found in the Settings menu. While they are generally interchangable, this help page describes the version of g.extension run from the GRASS command line. If one method of installing the addon fails you might try again with the other. Help and man pages installed with the module will be available through the g.manual module. If your GRASS_ADDON_PATH environment variable contains more than one path, the default action is to use the first directory in the list. Custom user scripts and installed addons can share the same addons directory.Note: Bourne shell and Python scripts run within GRASS that use the g.parser module must be in the system's search PATH, or else g.parser will not be able to find them and complain about a failure to obtain the module's interface description. As long as the GRASS_ADDON_PATH environment variable is set before you start GRASS this will be taken care of automatically at startup. For users building all of GRASS from source code who have also checked out the GRASS-addons Subversion repository, an alternate approach is to cd into the addon module's source directory, then run:
make MODULE_TOPDIR=/path/to/grass/source
alias gmake643='make MODULE_TOPDIR=/path/to/grass643/source'
-
Forward compatibility: Any script written for GRASS 6.0 or newer should work without changes with any newer version of GRASS 6. Module names, options, and flag behavior will be respected for the life of the stable release series.
-
Backwards compatibility: Scripts written for newer versions of GRASS 6.4 may not work with earlier versions of GRASS 6 if they use commands which were introduced later in the series. Other than that, they should be fine.
-
API compatibility: While GRASS 6's core C library API is reasonably stable (at time of writing it has not changed in 16 months) it is not guaranteed. ABI compatibility is typically not maintained and compiled C and C++ modules will need to be recompiled after an upgrade in GRASS version. Changes to the source code should not be needed however, most changes are simply the addition of new functionality and care has been taken to avoid the repurposing or removal of old functions or libraries.
-
The GRASS Python library: It is still in development, and Python 3 is just around the corner, so you can expect a few changes but starting with GRASS 6.4.3 the core scripting library API is expected to remain mostly stable. SWIG access to the GRASS C libraries has now been removed and replaced by the ctypes library.
-
Compatibility with GRASS 7: Not guaranteed. It is suggested to use a separate directory for your GRASS 7 addons, or name your custom scripts with the version number in the name. If you wish to write dual-compatible scripts, the g.version module and GRASS_VERSION environment variable are available for parsing at run-time.
EXAMPLES¶
Download and install i.landsat.toar into the current GRASS addons directory:g.extension r.out.kml
BUGS¶
This is a relatively new module and obtaining successful behavior on all platforms is rather tricky. Please report any problems to the GRASS bug tracker. If this automatic build fails, instructions for compiling both the GRASS source code and GRASS addons by hand can be found in the GRASS wiki. Note that Bourne shell and Python scripts can simply be downloaded from the online Subversion repository browser and moved into your GRASS_ADDON_PATH directory by hand. On UNIX you will likely need to set the executable bit using chmod before the script will run. In this case the associated usage section of the help page will not be created. Installing addon Python scripts on MS Windows is still experimental and is not guaranteed to work properly at run-time due to association of ".py" file extensions with python.exe. It is possible to run them, but be aware that you will typically need to call them with ".py" as part of the module name.SEE ALSO¶
-
The GRASS Addons module listing in the GRASS Wiki
-
The wxGUI extension manager (found in the Settings menu)
-
Details on contributing modules you have written to the GRASS addons repository can be found in the GRASS Development Wiki
AUTHORS¶
Markus NetelerGRASS 6.4.4 |