Browse Source

Merge branch 'master' into expand-wildcards

Laszlo Csomor 6 years ago
parent
commit
416872ef2c

+ 1 - 1
BUILD

@@ -893,7 +893,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"],

+ 1 - 6
WORKSPACE

@@ -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(
     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",

+ 1 - 1
cmake/extract_includes.bat.in

@@ -56,6 +56,7 @@ copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\implicit_weak_message
 copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\inlined_string_field.h" include\google\protobuf\inlined_string_field.h
 copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\inlined_string_field.h" include\google\protobuf\inlined_string_field.h
 copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\io\coded_stream.h" include\google\protobuf\io\coded_stream.h
 copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\io\coded_stream.h" include\google\protobuf\io\coded_stream.h
 copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\io\gzip_stream.h" include\google\protobuf\io\gzip_stream.h
 copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\io\gzip_stream.h" include\google\protobuf\io\gzip_stream.h
+copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\io\io_win32.h" include\google\protobuf\io\io_win32.h
 copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\io\printer.h" include\google\protobuf\io\printer.h
 copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\io\printer.h" include\google\protobuf\io\printer.h
 copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\io\strtod.h" include\google\protobuf\io\strtod.h
 copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\io\strtod.h" include\google\protobuf\io\strtod.h
 copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\io\tokenizer.h" include\google\protobuf\io\tokenizer.h
 copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\io\tokenizer.h" include\google\protobuf\io\tokenizer.h
@@ -89,7 +90,6 @@ copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\stubs\casts.h" includ
 copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\stubs\common.h" include\google\protobuf\stubs\common.h
 copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\stubs\common.h" include\google\protobuf\stubs\common.h
 copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\stubs\fastmem.h" include\google\protobuf\stubs\fastmem.h
 copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\stubs\fastmem.h" include\google\protobuf\stubs\fastmem.h
 copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\stubs\hash.h" include\google\protobuf\stubs\hash.h
 copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\stubs\hash.h" include\google\protobuf\stubs\hash.h
-copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\stubs\io_win32.h" include\google\protobuf\stubs\io_win32.h
 copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\stubs\logging.h" include\google\protobuf\stubs\logging.h
 copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\stubs\logging.h" include\google\protobuf\stubs\logging.h
 copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\stubs\macros.h" include\google\protobuf\stubs\macros.h
 copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\stubs\macros.h" include\google\protobuf\stubs\macros.h
 copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\stubs\mutex.h" include\google\protobuf\stubs\mutex.h
 copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\stubs\mutex.h" include\google\protobuf\stubs\mutex.h

+ 8 - 0
protobuf_deps.bzl

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

+ 1 - 0
src/google/protobuf/testing/zcgunzip.cc

@@ -42,6 +42,7 @@
 #include <stdio.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <stdlib.h>
 #include <fcntl.h>
 #include <fcntl.h>
+#include <unistd.h>
 
 
 #ifdef _WIN32
 #ifdef _WIN32
 #ifndef STDIN_FILENO
 #ifndef STDIN_FILENO

+ 1 - 0
src/google/protobuf/testing/zcgzip.cc

@@ -41,6 +41,7 @@
 #include <stdio.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <stdlib.h>
 #include <fcntl.h>
 #include <fcntl.h>
+#include <unistd.h>
 
 
 #ifdef _WIN32
 #ifdef _WIN32
 #ifndef STDIN_FILENO
 #ifndef STDIN_FILENO

+ 7 - 4
third_party/zlib.BUILD

@@ -52,9 +52,12 @@ cc_library(
         # choice of <> or "" delimiter when including itself.
         # choice of <> or "" delimiter when including itself.
     ] + _ZLIB_HEADERS,
     ] + _ZLIB_HEADERS,
     hdrs = _ZLIB_PREFIXED_HEADERS,
     hdrs = _ZLIB_PREFIXED_HEADERS,
-    copts = [
-        "-Wno-unused-variable",
-        "-Wno-implicit-function-declaration",
-    ],
+    copts = select({
+        "@bazel_tools//src/conditions:windows": [],
+        "//conditions:default": [
+            "-Wno-unused-variable",
+            "-Wno-implicit-function-declaration",
+        ],
+    }),
     includes = ["zlib/include/"],
     includes = ["zlib/include/"],
 )
 )

+ 1 - 1
util/python/BUILD

@@ -9,7 +9,7 @@
 # includes the following local_repository rule that points to this directory:
 # includes the following local_repository rule that points to this directory:
 #
 #
 # new_local_repository(
 # new_local_repository(
-#   name = "python",
+#   name = "python_headers",
 #   path = __workspace_dir__ + "/util/python",
 #   path = __workspace_dir__ + "/util/python",
 # )
 # )
 cc_library(
 cc_library(