[Scons-users] scons and clang++
Dirk Bächle
tshortik at gmx.de
Fri Jul 18 04:48:23 EDT 2014
Hi Florian,
On 18.07.2014 10:00, Florian Lindner wrote:
> Gary Oberbrunner wrote:
>
>> There isn't any magic; it still seems to me likely it's something in your
>> shell environment (not construction environment). You're sure you did
>> env['ENV'] = os.environ after constructing the environment?
> This is the code I use http://pastebin.com/GrJ2SFTu
>
> I am currently trying it with env['ENV'] = os.environ but on production code
> I rather want to keep it out to have a sane build environment.
I'm not a 100% sure, but I think the way you're setting the ENV var is a
little too late. The dictionary of environment variables has to be
available at the time when all the Tools are detected and
configured...and this happens in the call of the Environment()
constructor. So you should rather try:
env = Environment(ENV = os.environ, variables = vars)
instead. If all you need is the "PATH" variable, you can use:
env = Environment(ENV = {'PATH' : os.environ.get('PATH','')},
variables = vars)
Best regards,
Dirk
More information about the Scons-users
mailing list