Commit a74c43bb authored by Adam Liddell's avatar Adam Liddell Committed by Jie Luo

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
parent f2cfe2c8
...@@ -911,7 +911,7 @@ py_proto_library( ...@@ -911,7 +911,7 @@ py_proto_library(
py_extra_srcs = glob(["python/**/__init__.py"]), py_extra_srcs = glob(["python/**/__init__.py"]),
py_libs = [ py_libs = [
":python_srcs", ":python_srcs",
"//external:six", "@six//:six",
], ],
srcs_version = "PY2AND3", srcs_version = "PY2AND3",
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
......
...@@ -13,7 +13,7 @@ new_local_repository( ...@@ -13,7 +13,7 @@ new_local_repository(
) )
http_archive( http_archive(
name = "six_archive", name = "six",
build_file = "@//:six.BUILD", build_file = "@//:six.BUILD",
sha256 = "105f8d68616f8248e24bf0e9372ef04d3cc10104f1980f54d57b2ce73a5ad56a", sha256 = "105f8d68616f8248e24bf0e9372ef04d3cc10104f1980f54d57b2ce73a5ad56a",
urls = ["https://pypi.python.org/packages/source/s/six/six-1.10.0.tar.gz#md5=34eed507548117b2ab523ab14b2f8b55"], urls = ["https://pypi.python.org/packages/source/s/six/six-1.10.0.tar.gz#md5=34eed507548117b2ab523ab14b2f8b55"],
...@@ -41,11 +41,6 @@ bind( ...@@ -41,11 +41,6 @@ bind(
actual = "@submodule_gmock//:gtest_main", actual = "@submodule_gmock//:gtest_main",
) )
bind(
name = "six",
actual = "@six_archive//:six",
)
maven_jar( maven_jar(
name = "guava_maven", name = "guava_maven",
artifact = "com.google.guava:guava:18.0", artifact = "com.google.guava:guava:18.0",
......
...@@ -13,3 +13,11 @@ def protobuf_deps(): ...@@ -13,3 +13,11 @@ def protobuf_deps():
strip_prefix = "zlib-1.2.11", strip_prefix = "zlib-1.2.11",
urls = ["https://zlib.net/zlib-1.2.11.tar.gz"], 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"],
)
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