summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorIgnacio Etcheverry <neikeq@users.noreply.github.com>2018-09-17 19:55:43 +0200
committerGitHub <noreply@github.com>2018-09-17 19:55:43 +0200
commit9610bc95803a3524ff1aa21b2fb7d2f94c41e4b4 (patch)
tree866203a7a8e98c287506dbd930a797134ba8cd2d /modules
parentede5f696b6e62acaad3b1cf57934b2027dec2b79 (diff)
parent99cd17b102d865b1b010376918d4eb079c3e49dd (diff)
Merge pull request #22151 from 999eagle/monoexe
Check for mono binary when finding version
Diffstat (limited to 'modules')
-rw-r--r--modules/mono/config.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/modules/mono/config.py b/modules/mono/config.py
index 70fd1a35f1..38a99f4c94 100644
--- a/modules/mono/config.py
+++ b/modules/mono/config.py
@@ -282,7 +282,14 @@ def pkgconfig_try_find_mono_version():
def mono_root_try_find_mono_version(mono_root):
from compat import decode_utf8
- output = subprocess.check_output([os.path.join(mono_root, 'bin', 'mono'), '--version'])
+ mono_bin = os.path.join(mono_root, 'bin')
+ if os.path.isfile(os.path.join(mono_bin, 'mono')):
+ mono_binary = os.path.join(mono_bin, 'mono')
+ elif os.path.isfile(os.path.join(mono_bin, 'mono.exe')):
+ mono_binary = os.path.join(mono_bin, 'mono.exe')
+ else:
+ return None
+ output = subprocess.check_output([mono_binary, '--version'])
first_line = decode_utf8(output.splitlines()[0])
try:
return LooseVersion(first_line.split()[len('Mono JIT compiler version'.split())])