From: Luca Boccassi Date: Sat, 23 Dec 2023 08:56:31 +0000 (+0100) Subject: meson: check for pefile dependency before enabling ukify X-Git-Tag: v256-rc1~1401 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=85915f312c4f83365d603a33f065cf6d648cab27;hp=-c;p=thirdparty%2Fsystemd.git meson: check for pefile dependency before enabling ukify ukify (and all the tests, including the autogenerated check-version-ukify) does not work unless pefile is available, so track it as a dependency in meson to avoid unit test failures later --- 85915f312c4f83365d603a33f065cf6d648cab27 diff --git a/meson.build b/meson.build index 5ebc0a51e91..d1433e3dbc7 100644 --- a/meson.build +++ b/meson.build @@ -1811,7 +1811,9 @@ if have and efi_arch == 'x64' and cc.links(''' efi_cpu_family_alt = 'x86' endif -want_ukify = get_option('ukify').require(python_39, error_message : 'Python >= 3.9 required').allowed() +pefile = pymod.find_installation('python3', required: false, modules : ['pefile']) + +want_ukify = get_option('ukify').require(python_39 and (want_tests != 'true' or pefile.found()), error_message : 'Python >= 3.9 and pefile required').allowed() conf.set10('ENABLE_UKIFY', want_ukify) #####################################################################