From: Luca Boccassi <bl...@debian.org> We now require Meson 0.53 or later, so we can use this feature introduced in 0.51. This also fixes a build failure on SUSE Leap 15.6.
Cc: sta...@dpdk.org Signed-off-by: Luca Boccassi <bl...@debian.org> --- buildtools/meson.build | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/buildtools/meson.build b/buildtools/meson.build index 72447b60a0..3adf34e1a8 100644 --- a/buildtools/meson.build +++ b/buildtools/meson.build @@ -5,7 +5,11 @@ pkgconf = find_program('pkg-config', 'pkgconf', required: false) check_symbols = find_program('check-symbols.sh') ldflags_ibverbs_static = find_program('options-ibverbs-static.sh') -python3 = import('python').find_installation(required: false) +python3_required_modules = [] +if host_machine.system() != 'windows' + python3_required_modules = ['elftools'] +endif +python3 = import('python').find_installation('python3', required: false, modules: python3_required_modules) if python3.found() py3 = [python3] else @@ -45,16 +49,3 @@ else pmdinfogen += 'elf' endif -# TODO: starting from Meson 0.51.0 use -# python3 = import('python').find_installation('python', -# modules : python3_required_modules) -python3_required_modules = [] -if host_machine.system() != 'windows' - python3_required_modules = ['elftools'] -endif -foreach module : python3_required_modules - script = 'import importlib.util; import sys; exit(importlib.util.find_spec("@0@") is None)' - if run_command(py3, '-c', script.format(module), check: false).returncode() != 0 - error('missing python module: @0@'.format(module)) - endif -endforeach -- 2.43.0