[Scons-users] What is the difference between Variables and Options

Stefan Seefeld stefan at seefeld.name
Sat Jan 2 10:10:01 EST 2016


On 02.01.2016 02:15, Bill Deegan wrote:
> Stefan,
>
> Previously they were called options, but we changed the name to variables.
> So don't use options as you can see it's deprecated.
>
> Please point to where Options.GenerateHelpText() is recommended so we
> can change it.

There are a few places:
http://scons.org/doc/production/HTML/scons-user.html#chap-command-line
discusses (very briefly) the difference between "Options" and
"Variables", and I found some code in the wiki:
https://bitbucket.org/scons/scons/wiki/UnitTests

As the documentation above points out, options always begin with hyphen
characters, while variables are passed as key-value pairs separated by
an equal-sign. Is that convention affected by your statement above about
options now being called variables ? And what about

>     However, if I try to add the "--python" option as a variable key,
>     I get
>     the error "scons: *** Illegal Variables.Add() key `--python'".
>

I.e. how can I define the "--python" option ? I used to use
"AddOption()" (which is still documented and works fine), but now want
to extract the help text when invoking Help(), but since Options() is
deprecated and Variables().add("--python", ...) doesn't work, I'm not
sure what to use for that.

Thanks,
        Stefan


-- 

      ...ich hab' noch einen Koffer in Berlin...



More information about the Scons-users mailing list