[Bf-committers] scons vs. python
Nathan Letwory
jesterking at letwory.net
Sat Feb 4 21:33:24 CET 2006
I might have a way to fix this, but I need to test it. In short:
In the platform-config.py change all subsequent BF_PYTHON_VERSION
-occurrences to '${BF_PYTHON_VERSION}'. This should make it so it
evaluates the string only on actual usage.
/Nathan
> OK, this is bad. I want to use python 2.3, so
> I put into user-config.py:
>
> BF_PYTHON_VERSION = '2.3'
>
> Guess what scons does? Here's some output
> from scons -h:
>
> ---
> BF_PYTHON_VERSION: Python version to use
> default:
> actual: 2.3
>
> BF_PYTHON_INC: include path for Python headers
> default:
> actual: /usr/include/python2.4
>
> BF_PYTHON_BINARY: Path to the Python interpreter
> default:
> actual: /usr/bin/python2.4
>
> BF_PYTHON_LIB: Python library
> default:
> 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.
>
> Chris
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at projects.blender.org
> http://projects.blender.org/mailman/listinfo/bf-committers
>
More information about the Bf-committers
mailing list