Commit 23e520e7 authored by Adam Liddell's avatar Adam Liddell Committed by Adam Cozzette

Update six version to 1.12.0 and fix legacy_create_init issue

When the @six//:six library is used on a target without the
`legacy_create_init` flag disabled, the library will not be
usable due to __init__.py being empty and the six code will
be in six.py. This change forces six to occupy the __init__
name, preventing this file getting created regardless of
the `legacy_create_init` setting.

See comments on a74c43bb for
context:
https://github.com/protocolbuffers/protobuf/commit/a74c43bbd906a42b6bf70668c5d515c6f1d8d2cb
parent 8c46be03
...@@ -19,8 +19,8 @@ protobuf_deps() ...@@ -19,8 +19,8 @@ protobuf_deps()
http_archive( http_archive(
name = "six", name = "six",
build_file = "@//:six.BUILD", build_file = "@//:six.BUILD",
sha256 = "105f8d68616f8248e24bf0e9372ef04d3cc10104f1980f54d57b2ce73a5ad56a", sha256 = "d16a0141ec1a18405cd4ce8b4613101da75da0e9a7aec5bdd4fa804d0e0eba73",
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.12.0.tar.gz"],
) )
bind( bind(
......
...@@ -26,8 +26,8 @@ def protobuf_deps(): ...@@ -26,8 +26,8 @@ def protobuf_deps():
http_archive( http_archive(
name = "six", name = "six",
build_file = "@//:six.BUILD", build_file = "@//:six.BUILD",
sha256 = "105f8d68616f8248e24bf0e9372ef04d3cc10104f1980f54d57b2ce73a5ad56a", sha256 = "d16a0141ec1a18405cd4ce8b4613101da75da0e9a7aec5bdd4fa804d0e0eba73",
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.12.0.tar.gz"],
) )
if not native.existing_rule("rules_cc"): if not native.existing_rule("rules_cc"):
......
genrule( genrule(
name = "copy_six", name = "copy_six",
srcs = ["six-1.10.0/six.py"], srcs = ["six-1.12.0/six.py"],
outs = ["six.py"], outs = ["__init__.py"],
cmd = "cp $< $(@)", cmd = "cp $< $(@)",
) )
py_library( py_library(
name = "six", name = "six",
srcs = ["six.py"], srcs = ["__init__.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