[PATCH] meson: do not use python.full_path() unnecessarily

Paolo Bonzini posted 1 patch 2 years, 7 months ago
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20210908101332.272955-1-pbonzini@redhat.com
Maintainers: Gerd Hoffmann <kraxel@redhat.com>
ui/meson.build | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] meson: do not use python.full_path() unnecessarily
Posted by Paolo Bonzini 2 years, 7 months ago
The "python" variable is an external program and can be passed
directly to custom_target.  This avoids the need to look it up
multiple times, which was previously silent but is now explicit
in recent Meson versions.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 ui/meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ui/meson.build b/ui/meson.build
index 7d25c1b95b..7faa42eb3f 100644
--- a/ui/meson.build
+++ b/ui/meson.build
@@ -134,7 +134,7 @@ if have_system or xkbcommon.found()
                   output: output,
                   capture: true,
                   input: files('keycodemapdb/data/keymaps.csv'),
-                  command: [python.full_path(), files('keycodemapdb/tools/keymap-gen'),
+                  command: [python, files('keycodemapdb/tools/keymap-gen'),
                             'code-map',
                             '--lang', 'glib2',
                             '--varname', 'qemu_input_map_@0@_to_@1@'.format(e[0], e[1]),
-- 
2.31.1


Re: [PATCH] meson: do not use python.full_path() unnecessarily
Posted by Daniel P. Berrangé 2 years, 7 months ago
On Wed, Sep 08, 2021 at 12:13:32PM +0200, Paolo Bonzini wrote:
> The "python" variable is an external program and can be passed
> directly to custom_target.  This avoids the need to look it up
> multiple times, which was previously silent but is now explicit
> in recent Meson versions.
> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  ui/meson.build | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>


Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|


Re: [PATCH] meson: do not use python.full_path() unnecessarily
Posted by Philippe Mathieu-Daudé 2 years, 7 months ago
On 9/8/21 12:13 PM, Paolo Bonzini wrote:
> The "python" variable is an external program and can be passed
> directly to custom_target.  This avoids the need to look it up
> multiple times, which was previously silent but is now explicit
> in recent Meson versions.
> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  ui/meson.build | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>