diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2018-04-13 03:34:13 +0530 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek@centricular.com> | 2018-04-13 04:48:03 +0530 |
commit | 3acda1d9982176636ba45bcca41a847f4b6f6af2 (patch) | |
tree | b4fbc04cde0ff2446f9c7b559e76753a7fa0e192 /mesonbuild | |
parent | eb07ad867e97b6baaef2f1d7de080092c0a36ccc (diff) | |
download | meson-3acda1d9982176636ba45bcca41a847f4b6f6af2.zip meson-3acda1d9982176636ba45bcca41a847f4b6f6af2.tar.gz meson-3acda1d9982176636ba45bcca41a847f4b6f6af2.tar.bz2 |
PkgConfigDependency: dicts aren't hashable, so use frozenset
Diffstat (limited to 'mesonbuild')
-rw-r--r-- | mesonbuild/dependencies/base.py | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/mesonbuild/dependencies/base.py b/mesonbuild/dependencies/base.py index 8b07a21..4127081 100644 --- a/mesonbuild/dependencies/base.py +++ b/mesonbuild/dependencies/base.py @@ -462,17 +462,20 @@ class PkgConfigDependency(ExternalDependency): self.version_reqs) def _call_pkgbin_real(self, args, env): - if not env: - env = os.environ p, out = Popen_safe(self.pkgbin.get_command() + args, env=env)[0:2] return p.returncode, out.strip() def _call_pkgbin(self, args, env=None): + if env is None: + fenv = env + env = os.environ + else: + fenv = frozenset(env.items()) targs = tuple(args) cache = PkgConfigDependency.pkgbin_cache - if (self.pkgbin, targs, env) not in cache: - cache[(self.pkgbin, targs, env)] = self._call_pkgbin_real(args, env) - return cache[(self.pkgbin, targs, env)] + if (self.pkgbin, targs, fenv) not in cache: + cache[(self.pkgbin, targs, fenv)] = self._call_pkgbin_real(args, env) + return cache[(self.pkgbin, targs, fenv)] def _convert_mingw_paths(self, args): ''' |