Skip to content

Commit cedbf5d

Browse files
committed
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. (cherry picked from commit e22dd43) [backported to apply pre-code move] # Conflicts: # mesonbuild/dependencies/python.py
1 parent e0e4369 commit cedbf5d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

mesonbuild/modules/python.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,9 @@ def __init__(self, name: str, environment: 'Environment',
152152
else:
153153
self._find_libpy(installation, environment)
154154

155+
if not self.clib_compiler.has_header('Python.h', '', environment, extra_args=self.compile_args):
156+
self.is_found = False
157+
155158
def _find_libpy(self, python_holder: 'PythonInstallation', environment: 'Environment') -> None:
156159
if python_holder.is_pypy:
157160
if self.major_version == 3:

0 commit comments

Comments
 (0)