1. 04 May, 2017 1 commit
  2. 29 Mar, 2017 2 commits
  3. 22 Mar, 2017 1 commit
  4. 20 Mar, 2017 1 commit
  5. 16 Mar, 2017 1 commit
  6. 03 Mar, 2017 1 commit
  7. 23 Feb, 2017 1 commit
  8. 08 Feb, 2017 1 commit
  9. 25 Jan, 2017 1 commit
  10. 12 Jan, 2017 1 commit
  11. 20 Dec, 2016 1 commit
  12. 05 Dec, 2016 1 commit
  13. 03 Dec, 2016 1 commit
    • cgrushko's avatar
      Add a proto_lang_toolchain() for cc_proto_library · 45d92aea
      cgrushko authored
      Bazel's built-in cc_proto_library rule uses a proto_lang_toolchain to learn how to invoke proto-compiler.
      To use Bazel's cc_proto_library, add the following to your project's WORKSPACE file:
      
      local_repository(
        name = "com_google_protobuf_cc",
        path = "/path/to/protobuf-distribution/"
      )
      45d92aea
  14. 18 Oct, 2016 1 commit
  15. 10 Oct, 2016 1 commit
  16. 09 Oct, 2016 1 commit
  17. 06 Oct, 2016 2 commits
  18. 23 Sep, 2016 1 commit
  19. 22 Sep, 2016 1 commit
  20. 04 Aug, 2016 1 commit
  21. 26 May, 2016 1 commit
    • David Z. Chen's avatar
      Bazel build: Keep generated sources and Python runtime in the same directory. · 02cd45ca
      David Z. Chen authored
      Users often encounter a Python import error when trying to build Python
      protos if protobuf is installed locally on the machine. In this case,
      Python ends up looking in the wrong directory when importing files (see
      bazelbuild/bazel#1209 and tensorflow/tensorflow#2021). It seems that the
      problem is caused by Python getting confused when there are Python
      source files that are meant to be part of the same package but are
      in separate directories.
      
      Prior to #1233, the Bazel build setup would copy the Python
      runtime sources and all generated sources for the builtin protos into
      the root directory (assuming that the protobuf tree is vendored in a
      google/protobuf directory).
      
      With #1233, the two sets of sources are kept in their respective
      directories but both `src/` and `python/` are added to the `PYTHONPATH`
      using the new `imports` attribute of the Bazel Python rules. However,
      both the runtime sources and the generated sources are under the same
      package: `google.protobuf`, causing Python to become confused when
      trying to import modules that are in the other directory.
      
      This patch adds a workaround to the Bazel build to add a modified
      version of the original `internal_copied_filegroup` macro to copy the
      `.proto` files under `src/` to `python/` before building the
      `py_proto_library` targets for the builtin protos. This ensures that the
      generated sources for the builtin protos will be in the same directory
      as the corresponding runtime sources.
      
      This patch was tested with the following:
      * All Python tests in protobuf
      * All Python tests in tensorflow
      * All tests in [Skydoc](https://github.com/bazelbuild/skydoc)
      * Importing protobuf as `//google/protobuf`
      * Importing and binding targets under `//external`
      * Importing protobuf as `//third_party/protobuf`
      02cd45ca
  22. 28 Apr, 2016 1 commit
  23. 18 Apr, 2016 1 commit
  24. 15 Apr, 2016 1 commit
  25. 08 Apr, 2016 1 commit
  26. 04 Apr, 2016 2 commits
  27. 23 Mar, 2016 1 commit
  28. 12 Mar, 2016 1 commit
  29. 10 Mar, 2016 1 commit
  30. 09 Mar, 2016 1 commit
  31. 25 Feb, 2016 1 commit
    • David Z. Chen's avatar
      Remove hack for building Python support with Bazel. · 985c9684
      David Z. Chen authored
      This change makes use of new imports attribute for Bazel's Python rules, which
      enable adding directories to the PYTHONPATH. This allows us to remove
      the hack for building protobuf's Python support with Bazel and now
      allows projects to include protobuf using a Bazel external repository
      rather than requiring it to be imported directly into the source tree as
      //google/protobuf.
      
      This change also updates the protobuf BUILD file to use a named
      repository, @python//, for including Python headers rather than
      //util/python. This allows projects to specify their own package for
      Python headers when including protobuf with an external repository.
      
      Fixes #1230
      985c9684
  32. 23 Feb, 2016 1 commit
  33. 16 Feb, 2016 1 commit
  34. 22 Jan, 2016 1 commit
  35. 29 Dec, 2015 1 commit
  36. 08 Dec, 2015 2 commits