Forráskód Böngészése

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
Adam Liddell 6 éve
szülő
commit
23e520e7fc
3 módosított fájl, 7 hozzáadás és 7 törlés
  1. 2 2
      WORKSPACE
  2. 2 2
      protobuf_deps.bzl
  3. 3 3
      six.BUILD

+ 2 - 2
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(

+ 2 - 2
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"):

+ 3 - 3
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"],
 )