Re: Edit the environment variables in custom.py
Mats Wichmann <[email protected]>
| Newsgroups | gmane.comp.programming.tools.scons.user |
|---|---|
| Message-ID | <[email protected]> |
On 7/31/20 8:55 PM, [email protected] wrote: > Hello, > I'm trying to edit the environment for a build from within the custom.py config file. Is it still available? There's nothing magical about the name "custom.py". That filename happens to be used in some examples, particularly as an argument to Variables(), but the file (or files) to pass to that function can be any name. If this is what you meant (Variables)... > The only answers I found while searching were 7 years old (both Github Wiki and StackOverflow) and > they suggest using Evironment() but it gives me a "NameError: name 'Environment' is not defined" error i tried importing "Evironment" and "evironment" but with no luck. > Is there a way to do that? You don't need to mess with Environment to set this way. Just do Variables(files='default.py') and anything that looks like a variable setting in 'default.py' will be imported into the DefaultEnvironment (and if you create one, into Environment) as construction variables.