[Scons-users] MSVC_USE_SCRIPT=None via the command line?

Andrew C. Morrow andrew.c.morrow at gmail.com
Wed Jul 9 11:42:45 EDT 2014


Hi all -

In SCons 2.3.0, the MSVC_USE_SCRIPT environment variable is
overloaded, in that it can either take a string specifying the script
to use, or, if it has the Python value None, then no script is
executed, which can be useful if you are building in a 'dressed' shell
and propagating the shell environment through SCons.

However, if you try to set up MSVC_USE_SCRIPT via the AddVariable
mechanism, and then pass the Variables object along to the Environment
constructor, it seems there is no way to specify 'None' as the value
of MSVC_USE_SCRIPT.

I tried all of the following:

scons MSVC_USE_SCRIPT=
scons MSVC_USE_SCRIPT=None
scons MSVC_USE_SCRIPT=False

All of which failed.

One thought I had was to use the 'converter' feature of the Variables
facility, but unless I've misread the documentation it appears that
the value returned by the converter is stringified before being passed
to the validator and then on to the env. So that would make it
impossible to map special string values like 'None' or 'False' to the
equivalent python values.

Any suggestions on how to make this work? Or have I misunderstood
something about how to set this up?


More information about the Scons-users mailing list