[Scons-users] Variables 'Update' not adding variables to environment?

Dirk Bächle tshortik at gmx.de
Mon Jan 25 13:33:50 EST 2016


Hi James,

as I stated on StackOverflow already (note to other users: this question was asked there first, but then removed by its author) I 
can't reproduce the error you're seeing on my side. Neither under SuSE SLES11 with SCons 2.3.3, nor under Ubuntu Linux 14.04.03 LTS 
with SCons 2.3.5.

On 25.01.2016 09:56, James Ramm wrote:
> Hi
>
> I have the following in my SConstruct:
>
>      opts = Variables()
>
>      opts.AddVariables(
>
>          PathVariable('GDAL_INCLUDES', 'search path for gdal include files' ,'/usr/local/include', PathVariable.PathAccept),
>
>          BoolVariable('DEBUG', 'compile in debug mode', 'False'),
>
>      )
>
>      env = Environment()
>
>      opts.Update(env)
>

Is this really the full SConstruct that you're running on your side?

> If I then `print env['GDAL_INCLUDES']` I get a key error:

If yes, then why is the "print" statement not contained in it?

>
>      KeyError: 'GDAL_INCLUDES':
>
>        File "…/SConstruct", line 69:


And why does this line number show a "69" for such a seemingly small file?

Best regards,

Dirk



More information about the Scons-users mailing list