mirror of
https://github.com/vale981/ray
synced 2025-03-05 10:01:43 -05:00
Fix copy to workspace (#9400)
This commit is contained in:
parent
26fcda50e7
commit
5c853eaa6a
2 changed files with 5 additions and 6 deletions
|
@ -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.
|
||||
|
|
|
@ -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("/") + "/",
|
||||
|
@ -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("\\") + "\\",
|
||||
|
|
Loading…
Add table
Reference in a new issue