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 a74c43bbd9 for
context:
a74c43bbd9
pull/6530/head
Adam Liddell 6 years ago committed by Adam Cozzette
parent 8c46be0328
commit 23e520e7fc
  1. 4
      WORKSPACE
  2. 4
      protobuf_deps.bzl
  3. 6
      six.BUILD

@ -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():
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"):

@ -1,13 +1,13 @@
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"],
) )

Loading…
Cancel
Save