diff options
author | Clay John <claynjohn@gmail.com> | 2022-08-31 15:57:21 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-31 15:57:21 -0700 |
commit | 7061adf24f33f1f6eba184082e12aa2dcc4a6c04 (patch) | |
tree | d363e3fa87827f3c436202c6608046ea898ddb2c | |
parent | a5db03efa724b8910281d73576d31cc662b8cc13 (diff) | |
parent | 667f4ed742e0010adb678dff45e004310c4886d4 (diff) |
Merge pull request #65161 from m4gr3d/fix_android_build_failures_on_windows_main
Fix build failures for Android on Windows
-rw-r--r-- | methods.py | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/methods.py b/methods.py index 3a00aa12ca..649072d098 100644 --- a/methods.py +++ b/methods.py @@ -412,16 +412,17 @@ def use_windows_spawn_fix(self, platform=None): startupinfo = subprocess.STARTUPINFO() startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW - proc = subprocess.Popen( - cmdline, - stdin=subprocess.PIPE, - stdout=subprocess.PIPE, - stderr=subprocess.PIPE, - startupinfo=startupinfo, - shell=False, - env=env, - text=True, - ) + popen_args = { + "stdin": subprocess.PIPE, + "stdout": subprocess.PIPE, + "stderr": subprocess.PIPE, + "startupinfo": startupinfo, + "shell": False, + "env": env, + } + if sys.version_info >= (3, 7, 0): + popen_args["text"] = True + proc = subprocess.Popen(cmdline, **popen_args) _, err = proc.communicate() rv = proc.wait() if rv: |