From 8433990a3e9a14fa2c9b629de9b332754fd257bb Mon Sep 17 00:00:00 2001 From: UK992 Date: Mon, 10 Oct 2016 13:45:18 -0500 Subject: [PATCH] servo: Merge #13661 - Warn and exit mach if it detects MinGW Python (from UK992:mingw-python); r=Wafflespeanut r? @Wafflespeanut --- - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #13644 Source-Repo: https://github.com/servo/servo Source-Revision: c1cc2bbbaebf13710bee1cb426484c2eed155f7c --- servo/python/mach_bootstrap.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/servo/python/mach_bootstrap.py b/servo/python/mach_bootstrap.py index b5b94a726605..bd1f42417ad9 100644 --- a/servo/python/mach_bootstrap.py +++ b/servo/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):