diff options
author | Eli Schwartz <eschwartz@archlinux.org> | 2023-02-14 14:52:39 -0500 |
---|---|---|
committer | Eli Schwartz <eschwartz@archlinux.org> | 2023-02-22 14:52:02 -0500 |
commit | cedbf5db2c96dcd80287bc7d0d16a5af9afb6f7f (patch) | |
tree | 2bec0b72828b9e775444ed5408c49935a97efd89 | |
parent | e0e43698c22b13957be98cb0e97cc0841c25881c (diff) | |
download | meson-cedbf5db2c96dcd80287bc7d0d16a5af9afb6f7f.zip meson-cedbf5db2c96dcd80287bc7d0d16a5af9afb6f7f.tar.gz meson-cedbf5db2c96dcd80287bc7d0d16a5af9afb6f7f.tar.bz2 |
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 e22dd4345cad8e28536c83921a83915d50b56c69)
[backported to apply pre-code move]
# Conflicts:
# mesonbuild/dependencies/python.py
-rw-r--r-- | mesonbuild/modules/python.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/mesonbuild/modules/python.py b/mesonbuild/modules/python.py index 0c3d6a1..7e4469e 100644 --- a/mesonbuild/modules/python.py +++ b/mesonbuild/modules/python.py @@ -152,6 +152,9 @@ class PythonSystemDependency(SystemDependency, _PythonDependencyBase): else: self._find_libpy(installation, environment) + if not self.clib_compiler.has_header('Python.h', '', environment, extra_args=self.compile_args): + self.is_found = False + def _find_libpy(self, python_holder: 'PythonInstallation', environment: 'Environment') -> None: if python_holder.is_pypy: if self.major_version == 3: |