File tree 1 file changed +13
-1
lines changed
1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -52,7 +52,19 @@ def main():
52
52
if 'windows' in platform ().lower ():
53
53
msystem = os .environ .get ('MSYSTEM' , '' )
54
54
55
- if 'mingw64' not in sys .executable or 'MINGW64' not in msystem :
55
+ # Assume the environment isn't workable by default
56
+ env_ok = False
57
+
58
+ # Check if we're using the mingw64/msys2 environment
59
+ if 'mingw64' in sys .executable and 'MINGW64' in msystem :
60
+ env_ok = True
61
+
62
+ # Check if we're using a `uv`-based environment
63
+ if '\\ uv\\ ' in sys .executable or '/uv/' in sys .executable :
64
+ env_ok = True
65
+
66
+ # If none of the options above were true, then we're in an unsupported environment. Bomb out.
67
+ if not env_ok :
56
68
print ('ERROR: It seems you are not using the MINGW64 terminal.' )
57
69
print ('Please close this terminal and open a new MSYS2 MinGW 64-bit terminal.' )
58
70
print ('Python: %s, MSYSTEM: %s' % (sys .executable , msystem ))
You can’t perform that action at this time.
0 commit comments