From 23e520e7fc54d8f38c184e0da6da2cfea553cc4f Mon Sep 17 00:00:00 2001 From: Adam Liddell Date: Tue, 16 Jul 2019 15:17:28 +0000 Subject: [PATCH] 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 a74c43bbd906a42b6bf70668c5d515c6f1d8d2cb for context: https://github.com/protocolbuffers/protobuf/commit/a74c43bbd906a42b6bf70668c5d515c6f1d8d2cb --- WORKSPACE | 4 ++-- protobuf_deps.bzl | 4 ++-- six.BUILD | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/WORKSPACE b/WORKSPACE index 750079d231..34c26c7501 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -19,8 +19,8 @@ protobuf_deps() 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"], + sha256 = "d16a0141ec1a18405cd4ce8b4613101da75da0e9a7aec5bdd4fa804d0e0eba73", + urls = ["https://pypi.python.org/packages/source/s/six/six-1.12.0.tar.gz"], ) bind( diff --git a/protobuf_deps.bzl b/protobuf_deps.bzl index d7a3a9754a..d4a487e8bd 100644 --- a/protobuf_deps.bzl +++ b/protobuf_deps.bzl @@ -26,8 +26,8 @@ def protobuf_deps(): 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"], + sha256 = "d16a0141ec1a18405cd4ce8b4613101da75da0e9a7aec5bdd4fa804d0e0eba73", + urls = ["https://pypi.python.org/packages/source/s/six/six-1.12.0.tar.gz"], ) if not native.existing_rule("rules_cc"): diff --git a/six.BUILD b/six.BUILD index fb0b3604cd..88c75520de 100644 --- a/six.BUILD +++ b/six.BUILD @@ -1,13 +1,13 @@ genrule( name = "copy_six", - srcs = ["six-1.10.0/six.py"], - outs = ["six.py"], + srcs = ["six-1.12.0/six.py"], + outs = ["__init__.py"], cmd = "cp $< $(@)", ) py_library( name = "six", - srcs = ["six.py"], + srcs = ["__init__.py"], srcs_version = "PY2AND3", visibility = ["//visibility:public"], )