@ -531,7 +531,10 @@ cc_binary(
filegroup (
filegroup (
name = " testdata " ,
name = " testdata " ,
srcs = glob ( [ " src/google/protobuf/testdata/**/* " ] ) ,
srcs = glob ( [ " src/google/protobuf/testdata/**/* " ] ) ,
visibility = [ " //:__subpackages__ " ] ,
visibility = [
" //:__subpackages__ " ,
" @upb//:__subpackages__ " ,
] ,
)
)
RELATIVE_LITE_TEST_PROTOS = [
RELATIVE_LITE_TEST_PROTOS = [
@ -893,13 +896,23 @@ py_library(
[
[
" python/google/protobuf/**/*.py " ,
" python/google/protobuf/**/*.py " ,
] ,
] ,
exclude = [
) ,
imports = [ " python " ] ,
srcs_version = " PY2AND3 " ,
visibility = [ " @upb//:__subpackages__ " ] ,
)
py_library (
name = " python_test_srcs " ,
srcs = glob (
[
" python/google/protobuf/internal/*_test.py " ,
" python/google/protobuf/internal/*_test.py " ,
" python/google/protobuf/internal/test_util.py " ,
" python/google/protobuf/internal/test_util.py " ,
] ,
] ,
) ,
) ,
imports = [ " python " ] ,
imports = [ " python " ] ,
srcs_version = " PY2AND3 " ,
srcs_version = " PY3 " ,
visibility = [ " @upb//:__subpackages__ " ] ,
)
)
cc_binary (
cc_binary (
@ -996,9 +1009,21 @@ internal_copied_filegroup(
COPIED_WELL_KNOWN_PROTOS = [ " python/ " + s [ 4 : ] for s in WELL_KNOWN_PROTOS ]
COPIED_WELL_KNOWN_PROTOS = [ " python/ " + s [ 4 : ] for s in WELL_KNOWN_PROTOS ]
py_proto_library (
py_proto_library (
name = " protobuf_python " ,
name = " well_known_types_py_pb2 " ,
srcs = COPIED_WELL_KNOWN_PROTOS ,
srcs = COPIED_WELL_KNOWN_PROTOS ,
include = " python " ,
include = " python " ,
default_runtime = " " ,
protoc = " :protoc " ,
srcs_version = " PY2AND3 " ,
visibility = [ " @upb//:__subpackages__ " ] ,
)
py_library (
name = " protobuf_python " ,
deps = [
" :well_known_types_py_pb2 " ,
" :python_srcs " ,
] ,
data = select ( {
data = select ( {
" //conditions:default " : [ ] ,
" //conditions:default " : [ ] ,
" :use_fast_cpp_protos " : [
" :use_fast_cpp_protos " : [
@ -1006,13 +1031,6 @@ py_proto_library(
" :python/google/protobuf/pyext/_message.so " ,
" :python/google/protobuf/pyext/_message.so " ,
] ,
] ,
} ) ,
} ) ,
default_runtime = " " ,
protoc = " :protoc " ,
py_libs = [
" :python_srcs " ,
] ,
srcs_version = " PY2AND3 " ,
visibility = [ " //visibility:public " ] ,
)
)
# Copy the test proto files from src/google/protobuf to
# Copy the test proto files from src/google/protobuf to
@ -1040,7 +1058,8 @@ py_proto_library(
default_runtime = " " ,
default_runtime = " " ,
protoc = " :protoc " ,
protoc = " :protoc " ,
srcs_version = " PY2AND3 " ,
srcs_version = " PY2AND3 " ,
deps = [ " :protobuf_python " ] ,
deps = [ " :well_known_types_py_pb2 " ] ,
visibility = [ " //visibility:public " ] ,
)
)
py_proto_library (
py_proto_library (
@ -1054,6 +1073,7 @@ py_proto_library(
protoc = " :protoc " ,
protoc = " :protoc " ,
srcs_version = " PY2AND3 " ,
srcs_version = " PY2AND3 " ,
deps = [ " :python_common_test_protos " ] ,
deps = [ " :python_common_test_protos " ] ,
visibility = [ " //visibility:public " ] ,
)
)
py_library (
py_library (