diff options
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/markdown/snippets/add_external-program_cmd-array.md | 11 | ||||
| -rw-r--r-- | docs/yaml/objects/external_program.yaml | 5 |
2 files changed, 16 insertions, 0 deletions
diff --git a/docs/markdown/snippets/add_external-program_cmd-array.md b/docs/markdown/snippets/add_external-program_cmd-array.md new file mode 100644 index 000000000..f4d7a6c0e --- /dev/null +++ b/docs/markdown/snippets/add_external-program_cmd-array.md @@ -0,0 +1,11 @@ +## Add cmd_array method to ExternalProgram + +Added a new `cmd_array()` method to the `ExternalProgram` object that returns +an array containing the command(s) for the program. This is particularly useful +in cases like pyInstaller where the Python command is `meson.exe runpython`, +and the full path should not be used but rather the command array. + +The method returns a list of strings representing the complete command needed +to execute the external program, which may differ from just the full path +returned by `full_path()` in cases where wrapper commands or interpreters are +involved. diff --git a/docs/yaml/objects/external_program.yaml b/docs/yaml/objects/external_program.yaml index 4c24497a9..db5d39fab 100644 --- a/docs/yaml/objects/external_program.yaml +++ b/docs/yaml/objects/external_program.yaml @@ -56,3 +56,8 @@ methods: ```meson run_command(find_program('foo'), 'arg1', 'arg2') ``` + +- name: cmd_array + returns: array[str] + description: Returns an array containing the command(s) for the program. + since: 1.10.0 |
