diff options
author | László Csomor <laszlocsomor@google.com> | 2017-08-11 10:28:36 +0200 |
---|---|---|
committer | Marcel Hlopko <hlopko@google.com> | 2017-08-11 12:56:56 +0200 |
commit | 0783b9e81328729353cfad7ec25391c03d7f772a (patch) | |
tree | 8c68cb2697f13359847814b1e4ecf8708ead37ea /BUILD | |
parent | 5f99fdab1485186292068d274411201e4fb9208f (diff) |
Rewrite //:combine_distfiles.sh in Python
It can only pack to zip for now (packing to tar is
not trivial and I haven't figured it out yet).
This allows building //:bazel-distfile on Windows.
Previously it was either timing out or taking so
long that it was unbearable (over 10 minutes).
I never waited long enough to see it build.
The new Python version runs under just a few
seconds.
Change-Id: I3264eb7132dd58c581c4216e5bbab035a79d716d
PiperOrigin-RevId: 164954162
Diffstat (limited to 'BUILD')
-rw-r--r-- | BUILD | 15 |
1 files changed, 11 insertions, 4 deletions
@@ -68,6 +68,13 @@ pkg_tar( visibility = ["//:__subpackages__"], ) +py_binary( + name = "combine_distfiles", + srcs = ["combine_distfiles.py"], + visibility = ["//visibility:private"], + deps = ["//src:create_embedded_tools_lib"], +) + genrule( name = "bazel-distfile", srcs = [ @@ -75,8 +82,8 @@ genrule( "//src:derived_java_srcs", ], outs = ["bazel-distfile.zip"], - cmd = "$(location :combine_distfiles.sh) $@ $(SRCS)", - tools = ["combine_distfiles.sh"], + cmd = "$(location :combine_distfiles) $@ $(SRCS)", + tools = [":combine_distfiles"], # Public but bazel-only visibility. visibility = ["//:__subpackages__"], ) @@ -88,8 +95,8 @@ genrule( "//src:derived_java_srcs", ], outs = ["bazel-distfile.tar"], - cmd = "env USE_TAR=YES $(location :combine_distfiles.sh) $@ $(SRCS)", - tools = ["combine_distfiles.sh"], + cmd = "$(location :combine_distfiles_to_tar.sh) $@ $(SRCS)", + tools = ["combine_distfiles_to_tar.sh"], # Public but bazel-only visibility. visibility = ["//:__subpackages__"], ) |