Fix RUN_THIS.py so it would be cross-platform and it would be possible to use it from cmd on Windows (#26017)
Fix RUN_THIS.py so it would be possible to use it from cmd on Windows
This commit is contained in:
@@ -5,14 +5,9 @@ from __future__ import print_function
|
|||||||
import sys
|
import sys
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
IS_WINDOWS = sys.platform in ("win32", "cygwin")
|
|
||||||
|
|
||||||
version = sys.version_info
|
version = sys.version_info
|
||||||
if version.major < 3 or (version.major == 3 and version.minor < 5):
|
if version.major < 3 or (version.major == 3 and version.minor < 5):
|
||||||
print("ERROR: You need at least Python 3.5 to build SS14.")
|
print("ERROR: You need at least Python 3.5 to build SS14.")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
if IS_WINDOWS:
|
subprocess.run([sys.executable, "git_helper.py"], cwd="BuildChecker")
|
||||||
subprocess.run(["py", "-3", "git_helper.py"], cwd="BuildChecker")
|
|
||||||
else:
|
|
||||||
subprocess.run(["python3", "git_helper.py"], cwd="BuildChecker")
|
|
||||||
|
|||||||
Reference in New Issue
Block a user