Make sure Bazel generated files get overwritten (#4205)

This commit is contained in:
Philipp Moritz
2019-03-02 13:38:37 -08:00
committed by Robert Nishihara
parent 4b89eebfc7
commit 180414710e
+7 -2
View File
@@ -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