Skip to content

Commit

Permalink
Fix copy to workspace (#9400)
Browse files Browse the repository at this point in the history
  • Loading branch information
mehrdadn authored Jul 11, 2020
1 parent 26fcda5 commit 5c853ea
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -1973,7 +1973,7 @@ genrule(
outs = ["ray_pkg.out"],
cmd = """
if [ "$${OSTYPE-}" = "msys" ]; then
mv -f python/ray/_raylet.so python/ray/_raylet.pyd
ln -P -f -- python/ray/_raylet.so python/ray/_raylet.pyd
fi
# NOTE(hchen): Protobuf doesn't allow specifying Python package name. So we use this `sed`
# command to change the import path in the generated file.
Expand Down
9 changes: 4 additions & 5 deletions bazel/ray.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@ def copy_to_workspace(name, srcs, dstdir = ""):
for f in {locations}; do
rm -f -- {dstdir}$${{f##*/}}
cp -f -- "$$f" {dstdir}
echo $$f {dstdir}$${{f##*/}}
done > $@
done
date > $@
""".format(
locations = src_locations,
dstdir = "." + ("/" + dstdir.replace("\\", "/")).rstrip("/") + "/",
Expand All @@ -131,10 +131,9 @@ def copy_to_workspace(name, srcs, dstdir = ""):
) && (
for %f in ({locations}) do @(
(if exist {dstdir}%~nxf del /f /q {dstdir}%~nxf) &&
copy /B /Y %f {dstdir} >NUL &&
(echo %f {dstdir}%~nxf)
copy /B /Y %f {dstdir} >NUL
)
) > $@
) && >$@ echo %TIME%
""".replace("\r", "").replace("\n", " ").format(
locations = src_locations,
dstdir = "." + ("\\" + dstdir.replace("/", "\\")).rstrip("\\") + "\\",
Expand Down

0 comments on commit 5c853ea

Please sign in to comment.