Commit 29d650ae authored by Yannic Bonenberger's avatar Yannic Bonenberger Committed by Adam Cozzette

[bazel] Add `strip_prefix` to download of @six

This way, we can avoid an unnecessary copy.
parent 342a2d62
...@@ -27,6 +27,7 @@ def protobuf_deps(): ...@@ -27,6 +27,7 @@ def protobuf_deps():
name = "six", name = "six",
build_file = "@com_google_protobuf//:third_party/six.BUILD", build_file = "@com_google_protobuf//:third_party/six.BUILD",
sha256 = "d16a0141ec1a18405cd4ce8b4613101da75da0e9a7aec5bdd4fa804d0e0eba73", sha256 = "d16a0141ec1a18405cd4ce8b4613101da75da0e9a7aec5bdd4fa804d0e0eba73",
strip_prefix = "six-1.12.0",
urls = ["https://pypi.python.org/packages/source/s/six/six-1.12.0.tar.gz"], urls = ["https://pypi.python.org/packages/source/s/six/six-1.12.0.tar.gz"],
) )
......
genrule( load("@rules_python//python:defs.bzl", "py_library")
name = "copy_six",
srcs = ["six-1.12.0/six.py"],
outs = ["__init__.py"],
cmd = "cp $< $(@)",
)
py_library( py_library(
name = "six", name = "six",
srcs = ["__init__.py"], srcs = ["six.py"],
srcs_version = "PY2AND3", srcs_version = "PY2AND3",
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
) )
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment