diff options
| author | Stéphane Cerveau <scerveau@igalia.com> | 2024-10-30 15:53:52 +0100 |
|---|---|---|
| committer | Xavier Claessens <xclaesse@gmail.com> | 2025-11-05 08:12:46 -0500 |
| commit | 2e0e2663b80950a4b4106160a0cc6db12a39a559 (patch) | |
| tree | fce4c1e4a82b97328ee66c2ae8dbbc5ba711ec85 /docs | |
| parent | 60e3cc1c58c208c635bda23a7c62a92ae84cb6b6 (diff) | |
| download | meson-2e0e2663b80950a4b4106160a0cc6db12a39a559.tar.gz | |
ExternalProgram: add cmd_array to complete the offfering
In case of python and especially in the case of pyInstaller
where the python command is meson.exe runpython, it should
not be full path to be used but cmd_array.
Fixing #13834
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 |
