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

James Ramm James.Ramm at jbarisk.com
Mon Jan 25 03:56:39 EST 2016


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)

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

    KeyError: 'GDAL_INCLUDES':
      File ".../SConstruct", line 69:
        print env['GDAL_INCLUDES']
      File "/usr/lib/scons/SCons/Environment.py", line 413:
        return self._dict[key]


I can, however, do `print env['DEBUG']` and it correctly writes `False`

Any idea whats going on?


Thanks
James Ramm
Software Developer


Find out more about us here: www.jbarisk.com<http://www.jbarisk.com/> and follow us on Twitter @JBARisk<http://twitter.com/JBARisk> and LinkedIn<https://www.linkedin.com/company/2370847?trk=tyah&trkInfo=clickedVertical%3Acompany%2CclickedEntityId%3A2370847%2Cidx%3A2-1-2%2CtarId%3A1447414259786%2Ctas%3AJBA%20RISK%20MANAGEMENT>

The JBA Group supports the JBA Trust.

All JBA Risk Management's email messages contain confidential information and are intended only for the individual(s) named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail.
Please notify the sender immediately by email if you have received this email by mistake and delete this email from your system.


JBA Risk Management Limited is registered in England, company number 07732946, South Barn, Broughton Hall, Skipton, North Yorkshire, BD23 3AE, Telephone: +441756799919


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20160125/00d3e17a/attachment.html>


More information about the Scons-users mailing list