Skip to content

Commit c1cc2bb

Browse files
author
bors-servo
authored
Auto merge of #13661 - UK992:mingw-python, r=Wafflespeanut
Warn and exit mach if it detects MinGW Python <!-- Please describe your changes on the following line: --> r? @wafflespeanut --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #13644 <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13661) <!-- Reviewable:end -->
2 parents ef7423b + b9f39cb commit c1cc2bb

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

python/mach_bootstrap.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,14 @@ def bootstrap(topdir):
195195
print('Current path:', topdir)
196196
sys.exit(1)
197197

198+
# We don't support MinGW Python
199+
if os.path.join(os.sep, 'mingw64', 'bin') in sys.executable:
200+
print('Cannot run mach with MinGW Python.')
201+
print('\nPlease rename following files:')
202+
print(' /mingw64/bin/python2.exe -> /mingw64/bin/python2-mingw64.exe')
203+
print(' /mingw64/bin/python2.7.exe -> /mingw64/bin/python2.7-mingw64.exe')
204+
sys.exit(1)
205+
198206
# Ensure we are running Python 2.7+. We put this check here so we generate a
199207
# user-friendly error message rather than a cryptic stack trace on module import.
200208
if not (3, 0) > sys.version_info >= (2, 7):

0 commit comments

Comments
 (0)