[PATCH v5 05/16] meson, mkvenv: add functests custom target

John Snow posted 16 patches 3 days, 9 hours ago
Maintainers: "Alex Bennée" <alex.bennee@linaro.org>, "Philippe Mathieu-Daudé" <philmd@linaro.org>, Thomas Huth <thuth@redhat.com>, Ed Maste <emaste@freebsd.org>, Li-Wen Hsu <lwhsu@freebsd.org>, Yonggang Luo <luoyonggang@gmail.com>, Paolo Bonzini <pbonzini@redhat.com>, "Marc-André Lureau" <marcandre.lureau@redhat.com>, "Daniel P. Berrangé" <berrange@redhat.com>, John Snow <jsnow@redhat.com>, Cleber Rosa <crosa@redhat.com>, Maksim Davydov <davydov-max@yandex-team.ru>, Markus Armbruster <armbru@redhat.com>, Mauro Carvalho Chehab <mchehab+huawei@kernel.org>, Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>, Peter Xu <peterx@redhat.com>, Fabiano Rosas <farosas@suse.de>
[PATCH v5 05/16] meson, mkvenv: add functests custom target
Posted by John Snow 3 days, 9 hours ago
add the "pyvenv_functests_group" target to meson. This target will
invoke mkvenv.py to install the associated dependency group to the
build/pyvenv directory.

A "pyvenv_tooling_group" is not included here as it is the plan to
always install this group by default, so it will not need an on-demand
trigger.

Signed-off-by: John Snow <jsnow@redhat.com>
---
 meson.build        |  1 +
 pyvenv/meson.build | 27 +++++++++++++++++++++++++++
 2 files changed, 28 insertions(+)
 create mode 100644 pyvenv/meson.build

diff --git a/meson.build b/meson.build
index 8c6c0a9a32f..1c732a3adba 100644
--- a/meson.build
+++ b/meson.build
@@ -4556,6 +4556,7 @@ subdir('scripts')
 subdir('tools')
 subdir('pc-bios')
 subdir('docs')
+subdir('pyvenv')
 # Tests are disabled on emscripten because they rely on host features that aren't
 # supported by emscripten (e.g. fork and unix socket).
 if host_os != 'emscripten'
diff --git a/pyvenv/meson.build b/pyvenv/meson.build
new file mode 100644
index 00000000000..4e7d8d9fcc4
--- /dev/null
+++ b/pyvenv/meson.build
@@ -0,0 +1,27 @@
+# Note that this file only controls "optional" dependency groups; groups
+# unconditionally installed at configure time are handled in configure
+# instead; namely: meson, sphinx, and the tooling groups.
+
+# Note that this command may or may not include the "--online" flag
+# based on configuration.
+ensuregroup_cmd = config_host['MKVENV_ENSUREGROUP'].split()
+
+pyvenv_common_deps = files(
+    meson.project_source_root() + '/pythondeps.toml',
+    meson.project_source_root() + '/python/scripts/mkvenv.py'
+)
+pyvenv_wheel_dir = meson.project_source_root() + '/python/wheels'
+
+# This group is allowed to (and must) rely on internet to fetch from
+# PyPI. Force the use of the --online flag here.
+pyvenv_functests_group = custom_target(
+    'pyvenv_functests_group',
+    output: 'functests.group',
+    input: pyvenv_common_deps,
+    command: ensuregroup_cmd + [
+        '--online',
+        '--dir', pyvenv_wheel_dir,
+        '@INPUT0@',
+        'functests',
+    ],
+)
-- 
2.52.0
Re: [PATCH v5 05/16] meson, mkvenv: add functests custom target
Posted by Thomas Huth 2 days, 18 hours ago
On 03/02/2026 21.35, John Snow wrote:
> add the "pyvenv_functests_group" target to meson. This target will
> invoke mkvenv.py to install the associated dependency group to the
> build/pyvenv directory.
> 
> A "pyvenv_tooling_group" is not included here as it is the plan to
> always install this group by default, so it will not need an on-demand
> trigger.
> 
> Signed-off-by: John Snow <jsnow@redhat.com>
> ---
>   meson.build        |  1 +
>   pyvenv/meson.build | 27 +++++++++++++++++++++++++++
>   2 files changed, 28 insertions(+)
>   create mode 100644 pyvenv/meson.build



Reviewed-by: Thomas Huth <thuth@redhat.com>