###############################################################
pyopt = get_option('plpython')
+python3_dep = not_found_dep
if not pyopt.disabled()
pm = import('python')
python3_inst = pm.find_installation(required: pyopt)
- python3_dep = python3_inst.dependency(embed: true, required: pyopt)
- if not cc.check_header('Python.h', dependencies: python3_dep, required: pyopt)
- python3_dep = not_found_dep
+ if python3_inst.found()
+ python3_dep = python3_inst.dependency(embed: true, required: pyopt)
+ # Remove this check after we depend on Meson >= 1.1.0
+ if not cc.check_header('Python.h', dependencies: python3_dep, required: pyopt)
+ python3_dep = not_found_dep
+ endif
endif
-else
- python3_dep = not_found_dep
endif