aboutsummaryrefslogtreecommitdiffstats
path: root/python/mach_bootstrap.py
diff options
context:
space:
mode:
authorUK992 <urbankrajnc92@gmail.com>2016-10-09 21:04:20 +0200
committerUK992 <urbankrajnc92@gmail.com>2016-10-10 18:27:48 +0200
commitb9f39cb11161dc22d1048eb576456c8e6a32523b (patch)
tree20634bc45b40a5115ec269ee14f88ce995d3431a /python/mach_bootstrap.py
parent804317c8858a096eb99e1ff0baf860dbdfcbb04d (diff)
downloadservo-b9f39cb11161dc22d1048eb576456c8e6a32523b.tar.gz
servo-b9f39cb11161dc22d1048eb576456c8e6a32523b.zip
Warn and exit mach if it detects MinGW Python
Diffstat (limited to 'python/mach_bootstrap.py')
-rw-r--r--python/mach_bootstrap.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/python/mach_bootstrap.py b/python/mach_bootstrap.py
index b5b94a72660..bd1f42417ad 100644
--- a/python/mach_bootstrap.py
+++ b/python/mach_bootstrap.py
@@ -195,6 +195,14 @@ def bootstrap(topdir):
print('Current path:', topdir)
sys.exit(1)
+ # We don't support MinGW Python
+ if os.path.join(os.sep, 'mingw64', 'bin') in sys.executable:
+ print('Cannot run mach with MinGW Python.')
+ print('\nPlease rename following files:')
+ print(' /mingw64/bin/python2.exe -> /mingw64/bin/python2-mingw64.exe')
+ print(' /mingw64/bin/python2.7.exe -> /mingw64/bin/python2.7-mingw64.exe')
+ sys.exit(1)
+
# Ensure we are running Python 2.7+. We put this check here so we generate a
# user-friendly error message rather than a cryptic stack trace on module import.
if not (3, 0) > sys.version_info >= (2, 7):