[Scons-users] using Configure Contexts
tshortik at gmx.de
Sun Dec 27 07:42:10 EST 2015
On 25.12.2015 18:40, Stefan Seefeld wrote:
> Section 23.8 seems to suggest that a "custom check" would be appropriate here, so I'm trying to write my own
> "CheckPython(context)" function. However, inside that function I don't have access to the 'conf' object from above, only a 'context',
> which doesn't provide the same API. So I wonder what the purpose of these two objects is ('conf' and 'context' in my code above),
> and why the custom check functions don't receive a 'conf' object as argument instead.
what you get is a CheckContext. It wraps the actual SConfBase object (your "conf") to support logging and caching functionalities.
It still keeps the original SConfBase in its ".sconf" attribute, and you should also be able to access the environment of the
configure context with
which gets redirected to context.scons.env, via "__getattr__".
Does this help a bit?
More information about the Scons-users