Skip to content

Commit 0f8e474

Browse files
committed
WIP for removing gogo-python and supplying it via bazel
Signed-off-by: Dom Del Nano <ddelnano@gmail.com>
1 parent 85da50b commit 0f8e474

8 files changed

Lines changed: 22 additions & 8 deletions

File tree

bazel/gogo.bzl

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def _gogo_grpc_proto_impl(ctx):
2828
)
2929
ctx.file("github.com/gogo/protobuf/gogoproto/BUILD.bazel", """
3030
31-
load("@px//bazel:proto_compile.bzl", "pl_proto_library", "pl_cc_proto_library")
31+
load("@px//bazel:proto_compile.bzl", "pl_proto_library", "pl_cc_proto_library", "pl_py_proto_library")
3232
3333
pl_proto_library(
3434
name = "gogo_pl_proto",
@@ -44,6 +44,13 @@ pl_cc_proto_library(
4444
deps = [],
4545
)
4646
47+
pl_py_proto_library(
48+
name = "gogo_pl_py_proto",
49+
proto = ":gogo_pl_proto",
50+
visibility = ["//visibility:public"],
51+
deps = [],
52+
)
53+
4754
""")
4855

4956
gogo_grpc_proto = repository_rule(

src/api/proto/cloudpb/BUILD.bazel

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ pl_proto_library(
2727
"//src/api/proto/vispb:vis_pl_proto",
2828
"//src/api/proto/vizierconfigpb:vizier_pl_proto",
2929
"@gogo_special_proto//github.com/gogo/protobuf/gogoproto",
30+
"@gogo_grpc_proto//github.com/gogo/protobuf/gogoproto:gogo_pl_proto",
3031
],
3132
)
3233

@@ -42,6 +43,13 @@ pl_go_proto_library(
4243
],
4344
)
4445

46+
# pl_py_grpc_library(
47+
# name = "gogo_python_pl_py_grpc",
48+
# # imports = [""],
49+
# proto = "//third_party/gogo/protobuf/gogoproto:gogo_python_proto",
50+
# visibility = ["//src:__subpackages__"],
51+
# )
52+
4553
pl_py_grpc_library(
4654
name = "cloudapi_pl_py_grpc",
4755
imports = ["../../../../"],
@@ -51,5 +59,6 @@ pl_py_grpc_library(
5159
"//src/api/proto/uuidpb:uuid_pl_py_proto",
5260
"//src/api/proto/vispb:vis_pl_py_proto",
5361
"//src/api/proto/vizierconfigpb:vizier_pl_py_proto",
62+
"@gogo_grpc_proto//github.com/gogo/protobuf/gogoproto:gogo_pl_py_proto",
5463
],
5564
)

src/api/proto/vizierpb/BUILD.bazel

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,4 +53,7 @@ pl_py_grpc_library(
5353
imports = ["../../../"],
5454
proto = ":vizier_pl_proto",
5555
visibility = ["//src:__subpackages__"],
56+
deps = [
57+
"@gogo_grpc_proto//github.com/gogo/protobuf/gogoproto:gogo_pl_py_proto",
58+
],
5659
)

src/api/python/BUILD.bazel

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ py_wheel(
4040
python_tag = "py3",
4141
requires = [
4242
"Authlib==1.5.1",
43-
"gogo-python==0.0.1",
4443
"grpcio==1.70.0",
4544
"grpcio-tools==1.70.0",
4645
"protobuf==5.29.3",

src/api/python/pxapi/BUILD.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ py_library(
3030
visibility = ["//src/api/python:__subpackages__"],
3131
deps = [
3232
"//src/api/python/pxapi/proto:pxapi_py_proto_library",
33-
requirement("gogo-python"),
33+
"@gogo_grpc_proto//github.com/gogo/protobuf/gogoproto:gogo_pl_py_proto",
3434
requirement("grpcio"),
3535
requirement("grpcio-tools"),
3636
requirement("protobuf"),

src/api/python/pxapi/proto/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ colocate_python_files(
2222
srcs = [
2323
"//src/api/proto/cloudpb:cloudapi_pl_py_grpc",
2424
"//src/api/proto/vizierpb:vizier_pl_py_grpc",
25+
"@gogo_grpc_proto//github.com/gogo/protobuf/gogoproto:gogo_pl_py_proto",
2526
],
2627
protos_include_dir = "src/api/proto/",
2728
visibility = ["//src/api/python/pxapi:__subpackages__"],

src/api/python/requirements.bazel.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,10 +108,6 @@ cryptography==42.0.4 \
108108
--hash=sha256:fb0cef872d8193e487fc6bdb08559c3aa41b659a7d9be48b2e10747f47863925 \
109109
--hash=sha256:ffc73996c4fca3d2b6c1c8c12bfd3ad00def8621da24f547626bf06441400449
110110
# via authlib
111-
gogo-python==0.0.1 \
112-
--hash=sha256:55300f8c7f3645a267a391cb439f89f15d21aa58e3a07653353923f9f6a3627b \
113-
--hash=sha256:6f68d3aa598ee2ca4d3bb44b8afa2d4ef4a3198d6f5ae3824f38fbca2c6653ed
114-
# via -r requirements.txt
115111
grpcio==1.70.0 \
116112
--hash=sha256:0495c86a55a04a874c7627fd33e5beaee771917d92c0e6d9d797628ac40e7655 \
117113
--hash=sha256:07269ff4940f6fb6710951116a04cd70284da86d0a4368fd5a3b552744511f5a \

src/api/python/requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
Authlib==1.5.1
2-
gogo-python==0.0.1
32
grpcio==1.70.0
43
grpcio-tools==1.70.0
54
protobuf==5.29.3

0 commit comments

Comments
 (0)