aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mesonbuild/dependencies/cmake.py5
-rw-r--r--mesonbuild/dependencies/pkgconfig.py5
-rw-r--r--mesonbuild/wrap/wrap.py9
3 files changed, 11 insertions, 8 deletions
diff --git a/mesonbuild/dependencies/cmake.py b/mesonbuild/dependencies/cmake.py
index da5db5c..2a98020 100644
--- a/mesonbuild/dependencies/cmake.py
+++ b/mesonbuild/dependencies/cmake.py
@@ -126,9 +126,10 @@ class CMakeDependency(ExternalDependency):
cm_args = check_cmake_args(cm_args)
if CMakeDependency.class_cmakeinfo[self.for_machine] is None:
CMakeDependency.class_cmakeinfo[self.for_machine] = self._get_cmake_info(cm_args)
- self.cmakeinfo = CMakeDependency.class_cmakeinfo[self.for_machine]
- if self.cmakeinfo is None:
+ cmakeinfo = CMakeDependency.class_cmakeinfo[self.for_machine]
+ if cmakeinfo is None:
raise self._gen_exception('Unable to obtain CMake system information')
+ self.cmakeinfo = cmakeinfo
package_version = kwargs.get('cmake_package_version', '')
if not isinstance(package_version, str):
diff --git a/mesonbuild/dependencies/pkgconfig.py b/mesonbuild/dependencies/pkgconfig.py
index d000018..30e3d28 100644
--- a/mesonbuild/dependencies/pkgconfig.py
+++ b/mesonbuild/dependencies/pkgconfig.py
@@ -277,13 +277,14 @@ class PkgConfigDependency(ExternalDependency):
super().__init__(DependencyTypeName('pkgconfig'), environment, kwargs, language=language)
self.name = name
self.is_libtool = False
- self.pkgconfig = PkgConfigInterface.instance(self.env, self.for_machine, self.silent)
- if not self.pkgconfig:
+ pkgconfig = PkgConfigInterface.instance(self.env, self.for_machine, self.silent)
+ if not pkgconfig:
msg = f'Pkg-config for machine {self.for_machine} not found. Giving up.'
if self.required:
raise DependencyException(msg)
mlog.debug(msg)
return
+ self.pkgconfig = pkgconfig
version = self.pkgconfig.version(name)
if version is None:
diff --git a/mesonbuild/wrap/wrap.py b/mesonbuild/wrap/wrap.py
index 53caa02..c355c6d 100644
--- a/mesonbuild/wrap/wrap.py
+++ b/mesonbuild/wrap/wrap.py
@@ -404,12 +404,13 @@ class Resolver:
def resolve(self, packagename: str, force_method: T.Optional[Method] = None) -> T.Tuple[str, Method]:
self.packagename = packagename
self.directory = packagename
- self.wrap = self.wraps.get(packagename)
- if not self.wrap:
- self.wrap = self.get_from_wrapdb(packagename)
- if not self.wrap:
+ wrap = self.wraps.get(packagename)
+ if not wrap:
+ wrap = self.get_from_wrapdb(packagename)
+ if not wrap:
m = f'Neither a subproject directory nor a {self.packagename}.wrap file was found.'
raise WrapNotFoundException(m)
+ self.wrap = wrap
self.directory = self.wrap.directory
if self.wrap.has_wrap: