From e99fa0ca00f414a6c446090d2926747f931c73d5 Mon Sep 17 00:00:00 2001 From: Daniel Moody Date: Tue, 10 May 2022 16:48:52 -0500 Subject: switched name to SHELL_ENV_GENERATOR --- CHANGES.txt | 2 +- RELEASE.txt | 2 +- SCons/Action.py | 3 ++- SCons/Action.xml | 2 +- test/Actions/subst_shell_env-fixture/SConstruct | 2 +- 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 0dd7334..edb9648 100755 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -80,7 +80,7 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER - Added user configurable setting of ninja depfile format via NINJA_DEPFILE_PARSE_FORMAT. Now setting NINJA_DEPFILE_PARSE_FORMAT to [msvc,gcc,clang] can force the ninja expected format. Compiler tools will also configure the variable automatically. - - Added SHELL_ENV_EXPANDER construction variables. This variable allows the user to Define + - Added SHELL_ENV_GENERATOR construction variables. This variable allows the user to Define a function which will be called to obtain an environment which will be used in the shell command of some Action. diff --git a/RELEASE.txt b/RELEASE.txt index 3b65e57..abb4391 100755 --- a/RELEASE.txt +++ b/RELEASE.txt @@ -16,7 +16,7 @@ NEW FUNCTIONALITY - Added MSVC_USE_SCRIPT_ARGS variable to pass arguments to MSVC_USE_SCRIPT. - Added Configure.CheckMember() checker to check if struct/class has the specified member. -- Added SHELL_ENV_EXPANDER construction variables. This variable allows the user to Define +- Added SHELL_ENV_GENERATOR construction variables. This variable allows the user to Define a function which will be called to obtain an environment which will be used in the shell command of some Action. diff --git a/SCons/Action.py b/SCons/Action.py index 9f72efe..5c127a9 100644 --- a/SCons/Action.py +++ b/SCons/Action.py @@ -924,9 +924,10 @@ class CommandAction(_ActionAction): escape = env.get('ESCAPE', lambda x: x) - ENV = env.get('SHELL_ENV_EXPANDER', get_default_ENV)(env, target, source) + ENV = env.get('SHELL_ENV_GENERATOR ', get_default_ENV)(env, target, source) # Ensure that the ENV values are all strings: + for key, value in ENV.items(): if not is_String(value): if is_List(value): diff --git a/SCons/Action.xml b/SCons/Action.xml index 64b4da3..8849f71 100644 --- a/SCons/Action.xml +++ b/SCons/Action.xml @@ -200,7 +200,7 @@ in which the command should be executed. - + A function to obtain the environment dictionary which will be used diff --git a/test/Actions/subst_shell_env-fixture/SConstruct b/test/Actions/subst_shell_env-fixture/SConstruct index d71017b..18a04bc 100644 --- a/test/Actions/subst_shell_env-fixture/SConstruct +++ b/test/Actions/subst_shell_env-fixture/SConstruct @@ -10,7 +10,7 @@ def expand_this_generator(env, target, source, for_signature): env = Environment(tools=['textfile']) -env['SHELL_ENV_EXPANDER'] = custom_environment_expansion +env['SHELL_ENV_GENERATOR '] = custom_environment_expansion env['EXPAND_THIS'] = expand_this_generator env['ENV']['EXPANDED_SHELL_VAR'] = "$EXPAND_THIS" -- cgit v0.12