aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dependencies.py2
-rwxr-xr-xmeson_install.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/dependencies.py b/dependencies.py
index 4668ccf..448e6fe 100644
--- a/dependencies.py
+++ b/dependencies.py
@@ -137,7 +137,7 @@ class ExternalProgram():
self.fullpath = [shutil.which(name)]
if self.fullpath[0] is None and search_dir is not None:
trial = os.path.join(search_dir, name)
- suffix = os.path.splitext(trial)[-1].lower()
+ suffix = os.path.splitext(trial)[-1].lower()[1:]
if environment.is_windows() and (suffix == 'exe' or suffix == 'com'\
or suffix == 'bat'):
self.fullpath = [trial]
diff --git a/meson_install.py b/meson_install.py
index f267c5d..67b3a07 100755
--- a/meson_install.py
+++ b/meson_install.py
@@ -107,7 +107,7 @@ def run_install_script(d):
script = d.install_script
print('Running custom install script %s' % script)
suffix = os.path.splitext(script)[1].lower()
- if platform.system().lower() == 'windows' and suffix != 'bat':
+ if platform.system().lower() == 'windows' and suffix != '.bat':
first_line = open(script).readline().strip()
if first_line.startswith('#!'):
commands = first_line[2:].split('#')[0].strip().split()