Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix copy to workspace #9400

Merged
merged 2 commits into from
Jul 11, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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