Skip to content

Commit aaccce6

Browse files
author
Alex Walker
authored
Add Grakn Cluster messages to pip and npm packages (#116)
## What is the goal of this PR? Our Grakn Cluster-specific message definitions were included only in our Maven package. We added them to our pip and npm packages for use by our Python and NodeJS clients. ## What are the changes implemented in this PR? Add Grakn Cluster message definitions to pip and npm packages
1 parent 985d4a8 commit aaccce6

File tree

5 files changed

+40
-8
lines changed

5 files changed

+40
-8
lines changed

grpc/java/BUILD

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ java_grpc_compile(
3939
)
4040

4141
java_grpc_compile(
42-
name = "protocol-grakn-cluster-src",
42+
name = "protocol-cluster-src",
4343
deps = [
4444
"//protobuf/cluster:grakn-cluster-proto",
4545
"//protobuf/cluster:cluster-proto",
@@ -49,7 +49,7 @@ java_grpc_compile(
4949

5050
java_library(
5151
name = "protocol",
52-
srcs = [":protocol-src", ":protocol-grakn-cluster-src"],
52+
srcs = [":protocol-src", ":protocol-cluster-src"],
5353
deps = [
5454
"@maven//:com_google_guava_guava",
5555
"@maven//:com_google_protobuf_protobuf_java",

grpc/nodejs/BUILD

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,18 @@ ts_grpc_compile(
5656
]
5757
)
5858

59+
ts_grpc_compile(
60+
name = "protocol-cluster",
61+
deps = [
62+
"//protobuf/cluster:cluster-proto",
63+
"//protobuf/cluster:database-proto",
64+
"//protobuf/cluster:grakn-cluster-proto",
65+
],
66+
grpc_deps = [
67+
"//protobuf/cluster:grakn-cluster-proto",
68+
]
69+
)
70+
5971
pkg_npm(
6072
name = "protocol-package",
6173
package_name = "graknlabs_protocol",
@@ -64,6 +76,7 @@ pkg_npm(
6476
]),
6577
deps = [
6678
":protocol",
79+
":protocol-cluster",
6780
],
6881
)
6982

grpc/python/BUILD

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ load("@graknlabs_dependencies//distribution:deployment.bzl", "deployment")
2222
load("@graknlabs_dependencies//tool/checkstyle:rules.bzl", "checkstyle_test")
2323

2424
python_grpc_compile(
25-
name = "protocol_src",
25+
name = "protocol-src",
2626
deps = [
2727
"//protobuf:answer-proto",
2828
"//protobuf:concept-proto",
@@ -37,15 +37,34 @@ python_grpc_compile(
3737
visibility = ["//visibility:public"]
3838
)
3939

40+
python_grpc_compile(
41+
name = "protocol-cluster-src",
42+
deps = [
43+
"//protobuf/cluster:cluster-proto",
44+
"//protobuf/cluster:database-proto",
45+
"//protobuf/cluster:grakn-cluster-proto",
46+
],
47+
visibility = ["//visibility:public"]
48+
)
49+
4050
python_repackage(
41-
name = "protocol_pkg",
42-
src = ":protocol_src",
51+
name = "protocol-pkg",
52+
src = ":protocol-src",
53+
package = "grakn_protocol"
54+
)
55+
56+
python_repackage(
57+
name = "protocol-cluster-pkg",
58+
src = ":protocol-cluster-src",
4359
package = "grakn_protocol"
4460
)
4561

4662
py_library(
4763
name = "protocol",
48-
srcs = ["protocol_pkg"],
64+
srcs = [
65+
"protocol-pkg",
66+
"protocol-cluster-pkg",
67+
],
4968
imports = ["../../../grpc/python"]
5069
)
5170

@@ -63,10 +82,10 @@ assemble_pip(
6382
classifiers = [
6483
"Programming Language :: Python",
6584
"Programming Language :: Python :: 3",
66-
"Programming Language :: Python :: 3.5",
6785
"Programming Language :: Python :: 3.6",
6886
"Programming Language :: Python :: 3.7",
6987
"Programming Language :: Python :: 3.8",
88+
"Programming Language :: Python :: 3.9",
7089
"License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)",
7190
"Operating System :: OS Independent",
7291
"Intended Audience :: Developers",

protobuf/cluster/BUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ load("@graknlabs_dependencies//tool/checkstyle:rules.bzl", "checkstyle_test")
2121

2222
proto_library(
2323
name = "grakn-cluster-proto",
24-
srcs = ["grakn-cluster.proto"],
24+
srcs = [":grakn_cluster.proto"],
2525
deps = [":cluster-proto", ":database-proto"],
2626
)
2727

0 commit comments

Comments
 (0)