grpc/test/distrib/bazel/python
Shane Loretz 385431ca4b [Python Bazel] Allow overwriting grpc_library in python_rules.bzl (#35629)
Continues #35412 addressing feedback in https://github.com/grpc/grpc/pull/35412#issuecomment-1875980755

I'm unable to test the workspace with the newly added py_test, so I'm hoping a CI run here will tell me if the test works.

```console
~/grpc/test/distrib/bazel/python$ bazel --nohome_rc --nosystem_rc test //...
Loading:
Loading:
Loading: 0 packages loaded
Analyzing: 37 targets (0 packages loaded, 0 targets configured)
ERROR: /usr/local/foobar/home/sloretz/.cache/bazel/_bazel_sloretz/7f83b4f00f370e7c52a5cc586445673c/external/com_google_protobuf/upb_generator/BUILD:266:21: @com_google_protobuf//upb_generator:protoc-gen-upb_toolchain: no such attribute 'output_files' in 'proto_lang_toolchain' rule
ERROR: /usr/local/foobar/home/sloretz/.cache/bazel/_bazel_sloretz/7f83b4f00f370e7c52a5cc586445673c/external/com_google_protobuf/upb_generator/BUILD:305:21: @com_google_protobuf//upb_generator:protoc-gen-upb_minitable_toolchain: no such attribute 'output_files' in 'proto_lang_toolchain' rule
ERROR: /usr/local/foobar/home/sloretz/.cache/bazel/_bazel_sloretz/7f83b4f00f370e7c52a5cc586445673c/external/com_google_protobuf/upb_generator/BUILD:338:21: @com_google_protobuf//upb_generator:protoc-gen-upbdefs_toolchain: no such attribute 'output_files' in 'proto_lang_toolchain' rule
ERROR: /usr/local/foobar/home/sloretz/.cache/bazel/_bazel_sloretz/7f83b4f00f370e7c52a5cc586445673c/external/com_google_protobuf/upb_generator/BUILD:305:21: Target '@com_google_protobuf//upb_generator:protoc-gen-upb_minitable_stage1' contains an error and its package is in error and referenced by '@com_google_protobuf//upb_generator:protoc-gen-upb_minitable_toolchain'
ERROR: /usr/local/foobar/home/sloretz/.cache/bazel/_bazel_sloretz/7f83b4f00f370e7c52a5cc586445673c/external/com_github_grpc_grpc/src/proto/grpc/gcp/BUILD:19:14: every rule of type proto_library implicitly depends upon the target '@com_google_protobuf//upb_generator:protoc-gen-upb_minitable_toolchain', but this target could not be found because of: Target '@com_google_protobuf//upb_generator:protoc-gen-upb_minitable_toolchain' contains an error and its package is in error
ERROR: Analysis failed
ERROR: Analysis of target '//namespaced/upper/example:no_import_no_strip_py_pb2_grpc' failed; build aborted:
INFO: Elapsed time: 0.171s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (0 packages loaded, 0 targets configured)
ERROR: Couldn't start the build. Unable to run tests
```

Closes #35629

PiperOrigin-RevId: 606695865
2024-02-13 11:45:29 -08:00
..
in_subpackage Rehome python bazel distribtest (#29275) 2022-04-01 15:04:50 -07:00
namespaced/upper/example [Python] Migrate from yapf to black (#33138) 2023-06-09 15:08:55 -07:00
subdir Rehome python bazel distribtest (#29275) 2022-04-01 15:04:50 -07:00
tools Rehome python bazel distribtest (#29275) 2022-04-01 15:04:50 -07:00
.bazelrc Fixed bazel tests for 7 (#35390) 2023-12-26 10:30:45 -08:00
.gitignore Rehome python bazel distribtest (#29275) 2022-04-01 15:04:50 -07:00
BUILD [Python Bazel] Allow overwriting grpc_library in python_rules.bzl (#35629) 2024-02-13 11:45:29 -08:00
README.md Rehome python bazel distribtest (#29275) 2022-04-01 15:04:50 -07:00
WORKSPACE [deps] Upgrade protobuf version to v25.0 (#34513) 2023-11-10 00:11:09 -08:00
grpc_library_replacement.py [Python Bazel] Allow overwriting grpc_library in python_rules.bzl (#35629) 2024-02-13 11:45:29 -08:00
grpc_library_replacement_test.py [Python Bazel] Allow overwriting grpc_library in python_rules.bzl (#35629) 2024-02-13 11:45:29 -08:00
helloworld.proto Rehome python bazel distribtest (#29275) 2022-04-01 15:04:50 -07:00
helloworld.py [Python] Migrate from yapf to black (#33138) 2023-06-09 15:08:55 -07:00
helloworld_moved.py [Python] Migrate from yapf to black (#33138) 2023-06-09 15:08:55 -07:00
import_from_grpcio_reflection.py [Bazel] Enable grpcio-reflection to be used via Bazel (#31013) 2023-08-16 14:23:23 -07:00
import_from_proto_library_package.py Rehome python bazel distribtest (#29275) 2022-04-01 15:04:50 -07:00
import_from_this_package.py Rehome python bazel distribtest (#29275) 2022-04-01 15:04:50 -07:00
python_rules_test.bzl [bazel] Auto-generate .pyi files in py_proto_library rule (#32872) 2023-06-12 14:36:24 -07:00
transitive_proto_dep.py Rehome python bazel distribtest (#29275) 2022-04-01 15:04:50 -07:00

README.md

Bazel Workspace Test

This directory houses a test ensuring that downstream projects can use @com_github_grpc_grpc//src/python/grpcio:grpcio, py_proto_library, and py_grpc_library.