aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJordan Williams <jordan@jwillikers.com>2024-05-07 09:40:44 -0500
committerJordan Williams <jordan@jwillikers.com>2024-05-13 07:25:53 -0500
commitf4641e961c793e79c6e5322ad9552eaaf0291998 (patch)
tree109e9bebef9c4b815c38d2af12bb0f64fc3efd72
parent69ae361c0854831ef226c2b1bc4525b6d54fb9d5 (diff)
downloadutil-linux-stable/v2.40.tar.gz
meson: Correctly require the Python.h header for the python dependencystable/v2.40
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 <jordan@jwillikers.com> (cherry picked from commit 7e582204cd7cac2b55a2f7c0fb06899fcf7ff5df)
-rw-r--r--libmount/python/meson.build5
1 files changed, 5 insertions, 0 deletions
diff --git a/libmount/python/meson.build b/libmount/python/meson.build
index 422ecab8af..a385aae708 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,