We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7223f88 commit 677b45eCopy full SHA for 677b45e
setup.py
@@ -77,6 +77,17 @@ def get_platform():
77
return sys.platform
78
79
80
+# On MSYS, os.system needs to be wrapped with sh.exe
81
+# as otherwise all the io redirection will fail.
82
+# Arguably, this could happen inside the real os.system
83
+# rather than this monkey patch.
84
+if sys.platform == "win32" and "MSYSTEM" in os.environ:
85
+ os_system = os.system
86
+ def msys_system(command):
87
+ command_in_sh = 'sh.exe -c "%s"' % command.replace("\\", "\\\\")
88
+ return os_system(command_in_sh)
89
+ os.system = msys_system
90
+
91
CROSS_COMPILING = ("_PYTHON_HOST_PLATFORM" in os.environ)
92
HOST_PLATFORM = get_platform()
93
MS_WINDOWS = (HOST_PLATFORM == 'win32')
0 commit comments