[GRASS-dev] Re: [GRASS-SVN] r37667 - grass/trunk/gui/wxpython/nviz
Glynn Clements
glynn at gclements.plus.com
Tue Jun 2 06:41:07 EDT 2009
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 at gclements.plus.com>
More information about the grass-dev
mailing list