meson, mkvenv: add functests custom target
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. Reviewed-by: Thomas Huth <thuth@redhat.com> Message-ID: <20260218213416.674483-7-jsnow@redhat.com> Signed-off-by: John Snow <jsnow@redhat.com>
John Snow committed
Feb 18, 2026 at 16:34 UTC
1aa22ffee205f9b3be1c43bd2d5dea05ab2ddcff
2 files changed
+28
meson.build
+1
@@ -4580,6 +4580,7 @@ subdir('scripts')
4580
subdir('tools')
4581
subdir('pc-bios')
4582
subdir('docs')
4583
+subdir('pyvenv')
4584
# Tests are disabled on emscripten because they rely on host features that aren't
4585
# supported by emscripten (e.g. fork and unix socket).
4586
if host_os != 'emscripten'
pyvenv/meson.build
new
+27
@@ -0,0 +1,27 @@
1
+# Note that this file only controls "optional" dependency groups; groups
2
+# unconditionally installed at configure time are handled in configure
3
+# instead; namely: meson, sphinx, and the tooling groups.
4
+
5
+# Note that this command may or may not include the "--online" flag
6
+# based on configuration.
7
+ensuregroup_cmd = config_host['MKVENV_ENSUREGROUP'].split()
8
+
9
+pyvenv_common_deps = files(
10
+ meson.project_source_root() + '/pythondeps.toml',
11
+ meson.project_source_root() + '/python/scripts/mkvenv.py'
12
+)
13
+pyvenv_wheel_dir = meson.project_source_root() + '/python/wheels'
14
+
15
+# This group is allowed to (and must) rely on internet to fetch from
16
+# PyPI. Force the use of the --online flag here.
17
+pyvenv_functests_group = custom_target(
18
+ 'pyvenv_functests_group',
19
+ output: 'functests.group',
20
+ input: pyvenv_common_deps,
21
+ command: ensuregroup_cmd + [
22
+ '--online',
23
+ '--dir', pyvenv_wheel_dir,
24
+ '@INPUT0@',
25
+ 'functests',
26
+ ],
27
+)