aboutsummaryrefslogtreecommitdiff
path: root/dependencies.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2014-09-26 18:03:06 +0300
committerJussi Pakkanen <jpakkane@gmail.com>2014-09-26 18:03:06 +0300
commitff934952a05307498cbcd4c06a9afa432dbc9d3b (patch)
tree57122bd9385bf2f2a203bf79228fefcbb082dab9 /dependencies.py
parent1dc8d324fa3005628c9eff3dd105bd353f930f4a (diff)
downloadmeson-ff934952a05307498cbcd4c06a9afa432dbc9d3b.zip
meson-ff934952a05307498cbcd4c06a9afa432dbc9d3b.tar.gz
meson-ff934952a05307498cbcd4c06a9afa432dbc9d3b.tar.bz2
Some windows fixes.
Diffstat (limited to 'dependencies.py')
-rw-r--r--dependencies.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/dependencies.py b/dependencies.py
index ca264e2..4668ccf 100644
--- a/dependencies.py
+++ b/dependencies.py
@@ -137,7 +137,11 @@ 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)
- if os.access(trial, os.X_OK):
+ suffix = os.path.splitext(trial)[-1].lower()
+ if environment.is_windows() and (suffix == 'exe' or suffix == 'com'\
+ or suffix == 'bat'):
+ self.fullpath = [trial]
+ elif not environment.is_windows() and os.access(trial, os.X_OK):
self.fullpath = [trial]
else:
# Now getting desperate. Maybe it is a script file that is a) not chmodded