[Scons-users] What is the difference between Variables and Options
Bill Deegan
bill at baddogconsulting.com
Sat Jan 2 02:15:32 EST 2016
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.
-Bill
On Fri, Jan 1, 2016 at 8:09 PM, Stefan Seefeld <stefan at seefeld.name> wrote:
> SCons supports the definition of "options" via AddOption(...) and
> "variables" via
>
> v = Variables()
> env = Environment(variables=v)
>
> How do they relate ? In some sample code I found I find "options" to be
> used for the typical command-line options using leading '--' (such as in
> `scons --prefix=/usr/bin`), while variables allow the definition of
> key/value pairs (such as `scons threading=multi`).
>
> Now I want to provide my own help text via Help(). I have found some
> sample code that uses the Variables.GenerateHelpText() method. Elsewhere
> I see the use of Options.GenerateHelpText(), so I try to combine both.
>
> That yields a warning "scons: warning: The Options class is deprecated;
> use the Variables class instead.".
> However, if I try to add the "--python" option as a variable key, I get
> the error "scons: *** Illegal Variables.Add() key `--python'".
>
> So I'm clearly missing something. Could someone please help ? What are
> options, what are variables, and how do I use them ?
>
> Thanks,
> Stefan
>
> --
>
> ...ich hab' noch einen Koffer in Berlin...
>
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20160101/3e5d9115/attachment.html>
More information about the Scons-users
mailing list