aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/modules
diff options
context:
space:
mode:
authorDaniel Mensinger <daniel@mensinger-ka.de>2019-04-23 14:58:18 +0200
committerDaniel Mensinger <daniel@mensinger-ka.de>2019-04-29 12:17:40 +0200
commite75211d321d7416b8a4871d3015a7915fb86b53b (patch)
treee6460b95e475fe7fabbb47ee318160ecb6228357 /mesonbuild/modules
parentbf98ffca9ee67a6a942b9abf96b536692370cf03 (diff)
downloadmeson-e75211d321d7416b8a4871d3015a7915fb86b53b.zip
meson-e75211d321d7416b8a4871d3015a7915fb86b53b.tar.gz
meson-e75211d321d7416b8a4871d3015a7915fb86b53b.tar.bz2
Fix builtin variable names
Diffstat (limited to 'mesonbuild/modules')
-rw-r--r--mesonbuild/modules/python.py6
-rw-r--r--mesonbuild/modules/windows.py4
2 files changed, 5 insertions, 5 deletions
diff --git a/mesonbuild/modules/python.py b/mesonbuild/modules/python.py
index a0ebe0e..04941ea 100644
--- a/mesonbuild/modules/python.py
+++ b/mesonbuild/modules/python.py
@@ -477,9 +477,9 @@ class PythonModule(ExtensionModule):
ver = {'python2': '-2', 'python3': '-3'}[name_or_path]
cmd = ['py', ver, '-c', "import sysconfig; print(sysconfig.get_config_var('BINDIR'))"]
_, stdout, _ = mesonlib.Popen_safe(cmd)
- dir = stdout.strip()
- if os.path.exists(dir):
- return os.path.join(dir, 'python')
+ directory = stdout.strip()
+ if os.path.exists(directory):
+ return os.path.join(directory, 'python')
else:
return None
diff --git a/mesonbuild/modules/windows.py b/mesonbuild/modules/windows.py
index e8d266e..87a83fe 100644
--- a/mesonbuild/modules/windows.py
+++ b/mesonbuild/modules/windows.py
@@ -59,7 +59,7 @@ class WindowsModule(ExtensionModule):
if not rescomp.found():
raise MesonException('Could not find Windows resource compiler')
- for (arg, match, type) in [
+ for (arg, match, rc_type) in [
('/?', '^.*Microsoft.*Resource Compiler.*$', ResourceCompilerType.rc),
('--version', '^.*GNU windres.*$', ResourceCompilerType.windres),
]:
@@ -67,7 +67,7 @@ class WindowsModule(ExtensionModule):
m = re.search(match, o, re.MULTILINE)
if m:
mlog.log('Windows resource compiler: %s' % m.group())
- self._rescomp = (rescomp, type)
+ self._rescomp = (rescomp, rc_type)
break
else:
raise MesonException('Could not determine type of Windows resource compiler')