Skip to content

Commit 801e9f1

Browse files
authored
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 <chris@chrisarndt.de>
1 parent 8b773b4 commit 801e9f1

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

meson.build

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,9 @@ have_semaphore = cpp.has_header('semaphore.h')
7777
pymod = import('python')
7878
python = pymod.find_installation(get_option('python'), required: true, pure: false)
7979

80+
have_python_header = cpp.has_header('Python.h',
81+
include_directories: include_directories(python.get_path('include')), required: true)
82+
8083
# Generate _rtmidi extension source
8184
subdir('src')
8285

0 commit comments

Comments
 (0)