summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Moody <dmoody256@gmail.com>2022-05-10 18:21:49 (GMT)
committerDaniel Moody <dmoody256@gmail.com>2022-05-10 18:21:49 (GMT)
commit9ecd355fe1c76783c9b9135a65c78664a3864502 (patch)
tree4e1b695484e8f14a2a151191325099d1bc88013b
parenta8d29d2ddcdb846763ea176291bd18908803ed90 (diff)
downloadSCons-9ecd355fe1c76783c9b9135a65c78664a3864502.zip
SCons-9ecd355fe1c76783c9b9135a65c78664a3864502.tar.gz
SCons-9ecd355fe1c76783c9b9135a65c78664a3864502.tar.bz2
address matts comments
-rw-r--r--SCons/Action.xml16
-rw-r--r--test/Actions/subst_shell_env-fixture/SConstruct2
-rw-r--r--test/Actions/subst_shell_env.py3
3 files changed, 14 insertions, 7 deletions
diff --git a/SCons/Action.xml b/SCons/Action.xml
index 69781b8..64b4da3 100644
--- a/SCons/Action.xml
+++ b/SCons/Action.xml
@@ -205,19 +205,27 @@ in which the command should be executed.
<para>
A function to obtain the environment dictionary which will be used
when executing the &cv-link-SPAWN; function. This primarily give the
-user a chance to customize the shell environment for particular Actions.
+user a chance to customize the execution environment for particular Actions.
It must return a dictionary containing the environment variables as
keys and the values as values.
</para>
<example_commands>
-def custom_shell_env(env):
+def custom_shell_env(env, target, source):
</example_commands>
<para>
<varname>env</varname>
-The SCons construction environment from which the functionality
-shell environment can be derived from.
+The SCons construction environment from which the
+execution environment can be derived from.
+ </para>
+ <para>
+ <varname>target</varname>
+The list of targets associated with this action.
+ </para>
+ <para>
+ <varname>source</varname>
+The list of sources associated with this action.
</para>
</summary>
</cvar>
diff --git a/test/Actions/subst_shell_env-fixture/SConstruct b/test/Actions/subst_shell_env-fixture/SConstruct
index 1d6d2ef..bdd823e 100644
--- a/test/Actions/subst_shell_env-fixture/SConstruct
+++ b/test/Actions/subst_shell_env-fixture/SConstruct
@@ -21,4 +21,4 @@ env.Textfile('expand_script.py', [
'print(os.environ["EXPANDED_SHELL_VAR"])',
'print(os.environ["NON_EXPANDED_SHELL_VAR"])',
])
-env.Command('out.txt', 'expand_script.py', f'{sys.executable} $SOURCE > $TARGET')
+env.Command('out.txt', 'expand_script.py', fr'{sys.executable} $SOURCE > $TARGET')
diff --git a/test/Actions/subst_shell_env.py b/test/Actions/subst_shell_env.py
index 9d34a2b..c5e9530 100644
--- a/test/Actions/subst_shell_env.py
+++ b/test/Actions/subst_shell_env.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# __COPYRIGHT__
+# Copyright The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -22,7 +22,6 @@
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
"""
Verify that shell environment variables can be expanded per target/source