Skip to content

Commit

Permalink
Fix Windows CI (ray-project#9588)
Browse files Browse the repository at this point in the history
Co-authored-by: Mehrdad <[email protected]>
  • Loading branch information
mehrdadn and web-flow authored Jul 20, 2020
1 parent 02cbd4f commit 3d0a3c4
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,13 @@ def build(build_python, build_java):
"Detected: {}\n at: {!r}".format(sys.version, sys.executable))
raise OSError(msg)

bazel_env = dict(os.environ, PYTHON3_BIN_PATH=sys.executable)

if is_native_windows_or_msys():
BAZEL_SH = os.getenv("BAZEL_SH")
SHELL = bazel_env.get("SHELL")
if SHELL:
bazel_env.setdefault("BAZEL_SH", os.path.normpath(SHELL))
BAZEL_SH = bazel_env["BAZEL_SH"]
SYSTEMROOT = os.getenv("SystemRoot")
wsl_bash = os.path.join(SYSTEMROOT, "System32", "bash.exe")
if (not BAZEL_SH) and SYSTEMROOT and os.path.isfile(wsl_bash):
Expand Down Expand Up @@ -222,7 +227,7 @@ def build(build_python, build_java):
bazel_targets += ["//java:ray_java_pkg"] if build_java else []
return subprocess.check_call(
[bazel, "build", "--verbose_failures", "--"] + bazel_targets,
env=dict(os.environ, PYTHON3_BIN_PATH=sys.executable))
env=bazel_env)


def walk_directory(directory):
Expand Down

0 comments on commit 3d0a3c4

Please sign in to comment.