From 801e9f1e82c005a4a258b40bcdf2c9029f6511cd Mon Sep 17 00:00:00 2001 From: Christopher Arndt Date: Tue, 16 Apr 2024 21:08:57 +0200 Subject: [PATCH] fix: also check for presence of Python header with meson (#199) Checking for the presence of a Python installation alone is not sufficient and building might fail with compiler errors on systems, which have Python installed but not the matching headers Signed-off-by: Christopher Arndt --- meson.build | 3 +++ 1 file changed, 3 insertions(+) diff --git a/meson.build b/meson.build index 39efc4f..d748e2f 100644 --- a/meson.build +++ b/meson.build @@ -77,6 +77,9 @@ have_semaphore = cpp.has_header('semaphore.h') pymod = import('python') python = pymod.find_installation(get_option('python'), required: true, pure: false) +have_python_header = cpp.has_header('Python.h', + include_directories: include_directories(python.get_path('include')), required: true) + # Generate _rtmidi extension source subdir('src')