From 1bd14b52b26b0f4ec207bf7e38813b82bfc15f86 Mon Sep 17 00:00:00 2001 From: Christoph Reiter Date: Sat, 2 Feb 2019 15:54:05 +0100 Subject: python: don't require a Python lib in case we don't link against it. Fixes #4841 In case extensions aren't linked against libpython we can't assume one exists at all or is available in a known directory. --- mesonbuild/modules/python.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'mesonbuild/modules/python.py') diff --git a/mesonbuild/modules/python.py b/mesonbuild/modules/python.py index 1d41165..049c457 100644 --- a/mesonbuild/modules/python.py +++ b/mesonbuild/modules/python.py @@ -60,6 +60,7 @@ class PythonDependency(ExternalDependency): self.pkgdep = None self.variables = python_holder.variables self.paths = python_holder.paths + self.link_libpython = python_holder.link_libpython if mesonlib.version_compare(self.version, '>= 3.0'): self.major_version = 3 else: @@ -149,11 +150,11 @@ class PythonDependency(ExternalDependency): libdirs = [] largs = self.clib_compiler.find_library(libname, environment, libdirs) - - self.is_found = largs is not None - if self.is_found: + if largs is not None: self.link_args = largs + self.is_found = largs is not None or not self.link_libpython + inc_paths = mesonlib.OrderedSet([ self.variables.get('INCLUDEPY'), self.paths.get('include'), -- cgit v1.1