[GRASS-dev] python2/3 and GRASS build on Arch

Glynn Clements glynn at gclements.plus.com
Wed Jan 2 17:45:43 PST 2013

Maciej Sieczka wrote:

> On Arch GNU/Linux the `python' executable by default links to 
> `python3'. To use Python 2.x, one has to call `python2' explicitely. 
> This requires Archers to tweak include/Make/Platform.make.in and each 
> GRASS python executable to build and use GRASS (e.g. like in 
> https://aur.archlinux.org/packages/gr/grass7-svn/PKGBUILD).
> Can GRASS make system be changed so that the python executable used 
> during GRASS build and runtime is configurable?

The python interpreter is accessed via the make variable PYTHON, so
you can use e.g.:

	make PYTHON=python2

But in 7.0, all of the shell scripts have been replaced by Python
scripts, with the shebang:

	#!/usr/bin/env python

The simplest solution for this is probably to add a symlink from
$GISBASE/bin/python to the appropriate interpreter.

Glynn Clements <glynn at gclements.plus.com>

More information about the grass-dev mailing list