[GRASS-dev] Re: [GRASS-SVN] r37667 - grass/trunk/gui/wxpython/nviz

Hi,

2009/6/1 <svn_grass@osgeo.org>:

Author: glynn
Date: 2009-06-01 01:21:12 -0400 (Mon, 01 Jun 2009)
New Revision: 37667

Modified:
grass/trunk/gui/wxpython/nviz/setup.py
Log:
XMINC no longer exists
Use lists rather than tuples for variable lists

just for curiosity, why to prefer lists over tuples for loops?

Thanks, Martin

--
Martin Landa <landa.martin gmail.com> * http://gama.fsv.cvut.cz/~landa

Martin Landa wrote:

> Author: glynn
> Date: 2009-06-01 01:21:12 -0400 (Mon, 01 Jun 2009)
> New Revision: 37667
>
> Modified:
> grass/trunk/gui/wxpython/nviz/setup.py
> Log:
> XMINC no longer exists
> Use lists rather than tuples for variable lists

just for curiosity, why to prefer lists over tuples for loops?

Mostly convention, but lists are more consistent when dealing with
variable numbers of elements, specifically they don't require special
treatment for a single element.

But there are much bigger problems with build_ext.py, specifically
that attempting to parse the *.make files is a bug. Apart from only
supporting a subset of make's syntax (e.g. it doesn't expand the RHS,
doesn't understand "include", etc), it fails if the user overrides
variables on the command line.

Makefiles only set default values, but these can be overriden by the
user. E.g. Grass.make sets ARCH_DISTDIR to dist.$(ARCH), but the user
can use "make ARCH_DISTDIR=..." to set it to something else.

Realistically, you will need to use os.getenv(), and have the Makefile
add any required variables to the environment when running setup.py.

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