From b5d842305e025a6aa965b9c1d073c723e01e141b Mon Sep 17 00:00:00 2001 From: Eli Schwartz Date: Tue, 14 Feb 2023 14:52:39 -0500 Subject: python dependency: verify that the python header is installed for sysconfig We may or may not care that the library can be found. If link_libpython is false, we allow it to be missing and still find the dependency. --- mesonbuild/dependencies/python.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'mesonbuild/dependencies/python.py') diff --git a/mesonbuild/dependencies/python.py b/mesonbuild/dependencies/python.py index 1bbcdfedf..48ea31c7a 100644 --- a/mesonbuild/dependencies/python.py +++ b/mesonbuild/dependencies/python.py @@ -188,6 +188,9 @@ class PythonSystemDependency(SystemDependency, _PythonDependencyBase): if mesonlib.is_windows() and self.get_windows_python_arch() == '64' and self.major_version == 2: self.compile_args += ['-DMS_WIN64'] + if not self.clib_compiler.has_header('Python.h', '', environment, extra_args=self.compile_args): + self.is_found = False + def find_libpy(self, environment: 'Environment') -> None: if self.is_pypy: if self.major_version == 3: -- cgit v1.2.3