Skip to content

Commit

Permalink
Warn and exit mach if it detects MinGW Python
Browse files Browse the repository at this point in the history
  • Loading branch information
UK992 committed Oct 10, 2016
1 parent 804317c commit b9f39cb
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions python/mach_bootstrap.py
Expand Up @@ -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):
Expand Down

0 comments on commit b9f39cb

Please sign in to comment.