mirror of
https://github.com/wassname/ray.git
synced 2026-08-14 12:40:23 +08:00
Fix copy to workspace (#9400)
This commit is contained in:
+1
-1
@@ -1973,7 +1973,7 @@ genrule(
|
|||||||
outs = ["ray_pkg.out"],
|
outs = ["ray_pkg.out"],
|
||||||
cmd = """
|
cmd = """
|
||||||
if [ "$${OSTYPE-}" = "msys" ]; then
|
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
|
fi
|
||||||
# NOTE(hchen): Protobuf doesn't allow specifying Python package name. So we use this `sed`
|
# 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.
|
# command to change the import path in the generated file.
|
||||||
|
|||||||
+4
-5
@@ -118,8 +118,8 @@ def copy_to_workspace(name, srcs, dstdir = ""):
|
|||||||
for f in {locations}; do
|
for f in {locations}; do
|
||||||
rm -f -- {dstdir}$${{f##*/}}
|
rm -f -- {dstdir}$${{f##*/}}
|
||||||
cp -f -- "$$f" {dstdir}
|
cp -f -- "$$f" {dstdir}
|
||||||
echo $$f {dstdir}$${{f##*/}}
|
done
|
||||||
done > $@
|
date > $@
|
||||||
""".format(
|
""".format(
|
||||||
locations = src_locations,
|
locations = src_locations,
|
||||||
dstdir = "." + ("/" + dstdir.replace("\\", "/")).rstrip("/") + "/",
|
dstdir = "." + ("/" + dstdir.replace("\\", "/")).rstrip("/") + "/",
|
||||||
@@ -131,10 +131,9 @@ def copy_to_workspace(name, srcs, dstdir = ""):
|
|||||||
) && (
|
) && (
|
||||||
for %f in ({locations}) do @(
|
for %f in ({locations}) do @(
|
||||||
(if exist {dstdir}%~nxf del /f /q {dstdir}%~nxf) &&
|
(if exist {dstdir}%~nxf del /f /q {dstdir}%~nxf) &&
|
||||||
copy /B /Y %f {dstdir} >NUL &&
|
copy /B /Y %f {dstdir} >NUL
|
||||||
(echo %f {dstdir}%~nxf)
|
|
||||||
)
|
)
|
||||||
) > $@
|
) && >$@ echo %TIME%
|
||||||
""".replace("\r", "").replace("\n", " ").format(
|
""".replace("\r", "").replace("\n", " ").format(
|
||||||
locations = src_locations,
|
locations = src_locations,
|
||||||
dstdir = "." + ("\\" + dstdir.replace("/", "\\")).rstrip("\\") + "\\",
|
dstdir = "." + ("\\" + dstdir.replace("/", "\\")).rstrip("\\") + "\\",
|
||||||
|
|||||||
Reference in New Issue
Block a user