Skip to content

Commit 9b8dfe4

Browse files
Update BUILD to use pip_install defined in WORKSPACE
1 parent 07c2e52 commit 9b8dfe4

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

WORKSPACE

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,11 @@ pip_install(
145145
requirements = "//telecom/phone_calls/python:requirements.txt"
146146
)
147147

148+
pip_install(
149+
name = "sudoku_pip",
150+
requirements = "//sudoku:requirements.txt"
151+
)
152+
148153
# Load java example dependencies
149154
load("//dependencies/maven:artifacts.bzl", vaticle_typedb_examples_maven_artifacts = "artifacts")
150155

sudoku/BUILD

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,16 @@
1919
# under the License.
2020
#
2121
exports_files(["requirements.txt"])
22-
load("@rules_python//python:python.bzl", "py_binary", "py_test")
2322

23+
load("@rules_python//python:python.bzl", "py_binary", "py_test")
24+
load("@sudoku_pip//:requirements.bzl", sudoku_requirement = "requirement")
2425

26+
# Define targets
2527
py_library(
2628
name = "solver",
2729
srcs = ["solver.py"],
2830
deps = [
29-
"@vaticle_typedb_client_python//:client_python",
31+
sudoku_requirement("typedb-client")
3032
]
3133
)
3234

@@ -35,7 +37,7 @@ py_binary(
3537
srcs = ["driver.py"],
3638
deps = [
3739
"solver",
38-
"@vaticle_typedb_client_python//:client_python"
40+
sudoku_requirement("typedb-client")
3941
],
4042
data = [
4143
"sudoku6x6_schema.tql",
@@ -53,7 +55,7 @@ py_test(
5355
srcs = ["test.py"],
5456
deps = [
5557
"solver",
56-
"@vaticle_typedb_client_python//:client_python"
58+
sudoku_requirement("typedb-client")
5759
],
5860
data = [
5961
"sudoku6x6_schema.tql",
@@ -69,6 +71,8 @@ py_test(
6971
"sample/solution4.txt",
7072
]
7173
)
74+
75+
# Define checkstyle
7276
load("@vaticle_dependencies//tool/checkstyle:rules.bzl", "checkstyle_test")
7377
checkstyle_test(
7478
name = "checkstyle",

0 commit comments

Comments
 (0)