diff options
author | Jisi Liu <jisi.liu@gmail.com> | 2015-10-19 17:56:27 -0700 |
---|---|---|
committer | Jisi Liu <jisi.liu@gmail.com> | 2015-10-19 17:56:27 -0700 |
commit | 7b948cc7c5da776aad7f0008e2e108ffba961f37 (patch) | |
tree | b1d07646f271d4352da9d577fa56eb961b8c02a2 /BUILD | |
parent | 993fb7013e0139ec7b16abcada7995f3a642e331 (diff) | |
download | protobuf-7b948cc7c5da776aad7f0008e2e108ffba961f37.tar.gz protobuf-7b948cc7c5da776aad7f0008e2e108ffba961f37.tar.bz2 protobuf-7b948cc7c5da776aad7f0008e2e108ffba961f37.zip |
Support python for bazel.
Diffstat (limited to 'BUILD')
-rw-r--r-- | BUILD | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -463,6 +463,21 @@ java_library( # Python support ################################################################################ +# Hack: +# protoc generated files contain imports like: +# "from google.protobuf.xxx import yyy" +# However, the sources files of the python runtime are not directly under +# "google/protobuf" (they are under python/google/protobuf). We workaround +# this by copying runtime source files into the desired location to workaround +# the import issue. Ideally py_library should support something similiar to the +# "include" attribute in cc_library to inject the PYTHON_PATH for all libraries +# that depend on the target. +# +# If you use python protobuf as a third_party library in your bazel managed +# project, please import the whole package to //google/protobuf in your +# project. Otherwise, bazel disallows generated files out of the current +# package, thus we won't be able to copy protobuf runtime files into +# //google/protobuf/. copied_srcs( name = "python_srcs", srcs = glob( |