From: Jordan Williams Date: Tue, 7 May 2024 14:40:44 +0000 (-0500) Subject: meson: Correctly require the Python.h header for the python dependency X-Git-Tag: v2.42-start~353^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7e582204cd7cac2b55a2f7c0fb06899fcf7ff5df;p=thirdparty%2Futil-linux.git meson: Correctly require the Python.h header for the python dependency The current solution to require the Python.h header works around a bug in Meson that has been fixed for version 1.4.1 of Meson. Refer to https://github.com/mesonbuild/meson/issues/12862. This change uses an explicit check for the Python.h include. This verifies the required header exists. This check is only necessary prior to version 1.4.1 of Meson. Signed-off-by: Jordan Williams --- diff --git a/libmount/python/meson.build b/libmount/python/meson.build index 2c95365ba..ece8ecc7c 100644 --- a/libmount/python/meson.build +++ b/libmount/python/meson.build @@ -18,6 +18,11 @@ python = python_module.find_installation( get_option('python'), required : true, disabler : true) +if meson.version().version_compare('<1.4.1') + cc.has_header('Python.h', + include_directories : include_directories(python.get_path('include')), + required : true) +endif python.extension_module( 'pylibmount', pylibmount_sources,