[Bf-committers] scons vs. python

Chris Want cwant at ualberta.ca
Sat Feb 4 19:18:36 CET 2006

OK, this is bad. I want to use python 2.3, so
I put into user-config.py:


Guess what scons does? Here's some output
from scons -h:

BF_PYTHON_VERSION: Python version to use
     actual: 2.3

BF_PYTHON_INC: include path for Python headers
     actual: /usr/include/python2.4

BF_PYTHON_BINARY: Path to the Python interpreter
     actual: /usr/bin/python2.4

BF_PYTHON_LIB: Python library
     actual: python2.4

It appears that it evaluates the config/linux2-config.py
first, then reads the user-config.py

Maybe scons needs something akin to the ?= operator
from make? So what should be done is that the
user-config.mk is read first, then values in
config/linux2-config.py are only set if the
variable is currently unset. e.g.,
maybe a function is needed so a line is a
platform configuration file looks like this:

set_if_unset(BF_PYTHON_VERSION, "2.4")

Anyways, that would take care of problems related to
overriding and variable dependencies.


More information about the Bf-committers mailing list