From dcdfb7e3bab46ca281ecc83d6fb87f2cbf7b5b06 Mon Sep 17 00:00:00 2001 From: Jussi Pakkanen Date: Fri, 26 Sep 2014 18:31:07 +0300 Subject: [PATCH] A few suffix fixes. --- dependencies.py | 2 +- meson_install.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dependencies.py b/dependencies.py index 4668ccf22..448e6fe2d 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 f267c5dbb..67b3a071c 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()