[Scons-users] env.Command and _process_ environment variables :-(

Pedro Larroy pedro.larroy.lists at gmail.com
Tue Oct 16 11:13:01 EDT 2012


Hi

Is there a way to pass the process environment to env.Command target?
I think the environment is not being passed correctly.

I have an env.Command statement to build some artifacts. Before
calling Scons I call vcvarsall.bat to set the environment variables
that Visual Studio needs, PATH etc.

This env.Command ends up calling Microsoft's "cl" compiler.

The problem that I have is that "cl" is not found in the PATH, as when
executing env.Command seems the environment variables are not being
passed.

I tried creating env with Environment(ENV=os.environ)

When I call the Sconscript, os.environ has the correct environment.
And when I call the env.Command target manually after setting
vcvarsall.bat it works fine.

Thanks a lot.

Pedro.


More information about the Scons-users mailing list