Fix usage of six in //:protobuf_python rule and add import (#6310)

* Fix reference to six in //:protobuf_python rule

* Add six to protobuf_deps.bzl

* Use six archive directly as repo @six
This commit is contained in:
Adam Liddell 2019-07-15 23:35:19 +00:00 committed by Jie Luo
parent f2cfe2c834
commit a74c43bbd9
3 changed files with 10 additions and 7 deletions

2
BUILD
View File

@ -911,7 +911,7 @@ py_proto_library(
py_extra_srcs = glob(["python/**/__init__.py"]),
py_libs = [
":python_srcs",
"//external:six",
"@six//:six",
],
srcs_version = "PY2AND3",
visibility = ["//visibility:public"],

View File

@ -13,7 +13,7 @@ new_local_repository(
)
http_archive(
name = "six_archive",
name = "six",
build_file = "@//:six.BUILD",
sha256 = "105f8d68616f8248e24bf0e9372ef04d3cc10104f1980f54d57b2ce73a5ad56a",
urls = ["https://pypi.python.org/packages/source/s/six/six-1.10.0.tar.gz#md5=34eed507548117b2ab523ab14b2f8b55"],
@ -41,11 +41,6 @@ bind(
actual = "@submodule_gmock//:gtest_main",
)
bind(
name = "six",
actual = "@six_archive//:six",
)
maven_jar(
name = "guava_maven",
artifact = "com.google.guava:guava:18.0",

View File

@ -13,3 +13,11 @@ def protobuf_deps():
strip_prefix = "zlib-1.2.11",
urls = ["https://zlib.net/zlib-1.2.11.tar.gz"],
)
if "six" not in native.existing_rules():
http_archive(
name = "six",
build_file = "@//:six.BUILD",
sha256 = "105f8d68616f8248e24bf0e9372ef04d3cc10104f1980f54d57b2ce73a5ad56a",
urls = ["https://pypi.python.org/packages/source/s/six/six-1.10.0.tar.gz#md5=34eed507548117b2ab523ab14b2f8b55"],
)