Skip to content

Commit 0aa9527

Browse files
committed
build: Detect if Python.h header is present
Make sure the devel package is also installed not just the the Python interpreter. Signed-off-by: Daniel Wagner <[email protected]>
1 parent 042f5ea commit 0aa9527

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

libnvme/meson.build

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ if want_python != 'false'
1515
python3 = import('python').find_installation('python3')
1616
py3_dep = python3.dependency(required: want_python == 'true')
1717
swig = find_program('swig', required: want_python == 'true')
18-
have_python_support = py3_dep.found() and swig.found()
18+
header_found = cc.has_header('Python.h', dependencies: py3_dep)
19+
have_python_support = py3_dep.found() and swig.found() and header_found
1920
else
2021
have_python_support = false
2122
endif

0 commit comments

Comments
 (0)