From 180414710e4f43e08f53159bf865d557b7bc0891 Mon Sep 17 00:00:00 2001 From: Philipp Moritz Date: Sat, 2 Mar 2019 13:38:37 -0800 Subject: [PATCH] Make sure Bazel generated files get overwritten (#4205) --- build.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/build.sh b/build.sh index ec7b10e52..cf137c959 100755 --- a/build.sh +++ b/build.sh @@ -122,8 +122,13 @@ else --target=$ROOT_DIR/python/ray/pyarrow_files pyarrow==0.12.0.RAY \ --find-links https://s3-us-west-2.amazonaws.com/arrow-wheels/9357dc130789ee42f8181d8724bee1d5d1509060/index.html bazel build //:ray_pkg -c opt - # Copy files and skip existing files - cp -r -n $ROOT_DIR/bazel-genfiles/ray_pkg/ray $ROOT_DIR/python || true + # Copy files and keep them writeable. This is a workaround, as Bazel + # marks all generated files non-writeable. If we would just copy them + # over without adding write permission, the copy would fail the next time. + # TODO(pcm): It would be great to have a solution here that does not + # require us to copy the files. + find $ROOT_DIR/bazel-genfiles/ray_pkg/ -exec chmod +w {} \; + cp -r $ROOT_DIR/bazel-genfiles/ray_pkg/ray $ROOT_DIR/python || true fi popd