• Home
  • Raw
  • Download

Lines Matching +full:script +full:- +full:output

7 #     https://www.apache.org/licenses/LICENSE-2.0
19 # Defines an action that runs a Python script.
21 # This wraps a regular Python script GN action with an invocation of a script-
22 # runner script that adds useful features. pw_python_action() uses the same
25 # module May be used in place of the script argument to run the
26 # provided Python module with `python -m` instead of a script.
27 # Either script or module must be provided.
29 # capture_output If true, script output is hidden unless the script fails
32 # stamp File to touch if the script is successful. Actions that
33 # don't create output files can use this stamp file instead of
44 # <TARGET_FILE(//some/label:here)> - expands to the
45 # output file (such as a .a or .elf) from a GN target
46 # <TARGET_FILE_IF_EXISTS(//some/label:here)> - expands to
47 # the output file if the target exists, or nothing
48 # <TARGET_OBJECTS(//some/label:here)> - expands to the
53 # python_metadata_deps Python-related dependencies that are only used as deps
55 # overall Python script action. This should rarely be
56 # used by non-Pigweed code.
59 # the Python script or action.
62 # '/usr/bin/fakeroot --' to run the Python script within a
69 assert(defined(invoker.script) != defined(invoker.module),
70 "pw_python_action requires either 'script' or 'module'")
74 # script is invoked).
75 "--gn-root",
79 "--current-path",
82 "--default-toolchain=$default_toolchain",
83 "--current-toolchain=$current_toolchain",
90 _script_args += [ "--env=$variable" ]
100 # List the script to run as an input so that the action is re-run when it is
102 if (defined(invoker.script)) {
103 _inputs += [ invoker.script ]
112 # If a stamp file is requested, add it as an output of the runner script.
122 "--touch",
127 # Capture output or not (defaults to true).
129 _script_args += [ "--capture-output" ]
134 "--module",
152 "--working-directory",
159 "--command-launcher",
236 "--python-virtualenv-config",
241 "--python-dep-list-files",
245 # "--" indicates the end of arguments to the runner script.
247 # of the Python script to run.
248 _script_args += [ "--" ]
250 if (defined(invoker.script)) {
251 _script_args += [ rebase_path(invoker.script, root_build_dir) ]
260 "--python-dep-list-files",
277 # Check that script or module is a present and not a no-op.
279 if (defined(invoker.script) || defined(invoker.module)) {
285 "script",
293 script = "$dir_pw_build/py/pw_build/python_runner.py"