Skip to content

Commit fd6f278

Browse files
committed
bazel: don't use python native rules
1 parent 5e6f23b commit fd6f278

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

ortools/linear_solver/samples/code_samples.bzl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
"""Helper macro to compile and test code samples."""
1515

1616
load("@pip_deps//:requirements.bzl", "requirement")
17+
load("@rules_python//python:defs.bzl", "py_binary", "py_test")
1718

1819
def code_sample_cc(name):
1920
native.cc_binary(
@@ -41,7 +42,7 @@ def code_sample_cc(name):
4142
)
4243

4344
def code_sample_py(name):
44-
native.py_binary(
45+
py_binary(
4546
name = name + "_py3",
4647
srcs = [name + ".py"],
4748
main = name + ".py",
@@ -57,7 +58,7 @@ def code_sample_py(name):
5758
srcs_version = "PY3",
5859
)
5960

60-
native.py_test(
61+
py_test(
6162
name = name + "_py_test",
6263
size = "small",
6364
srcs = [name + ".py"],

0 commit comments

Comments
 (0)