fix platform detection
@@ -222,14 +222,13 @@ def downstream_projects():
}
}
-
-def python_binary():
- if is_windows():
+def python_binary(platform=None):
+ if platform == "windows":
return "python.exe"
return "python3.6"
def is_windows():
- return os.name == 'nt'
+ return os.name == "nt"
def gsutil_command():
if is_windows():
@@ -815,7 +814,7 @@ def print_project_pipeline(platform_configs, project_name, http_config,
def runner_step(platform, project_name=None, http_config=None,
git_repository=None, use_but=False):
- command = python_binary() + \
+ command = python_binary(platform) + \
" bazelci.py runner --platform=" + platform
if http_config:
command += " --http_config=" + http_config
@@ -890,7 +889,7 @@ def create_label(platform, project_name, build_only=False, test_only=False):
def bazel_build_step(platform, project_name, http_config=None, build_only=False, test_only=False):
- pipeline_command = python_binary() + " bazelci.py runner"
+ pipeline_command = python_binary(platform) + " bazelci.py runner"
if build_only:
pipeline_command += " --build_only --save_but"
if test_only:
