Skip to content

Commit

Permalink
bazel: don't use python native rules
Browse files Browse the repository at this point in the history
  • Loading branch information
Mizux committed Jul 22, 2024
1 parent 5e6f23b commit fd6f278
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ortools/linear_solver/samples/code_samples.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"""Helper macro to compile and test code samples."""

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

def code_sample_cc(name):
native.cc_binary(
Expand Down Expand Up @@ -41,7 +42,7 @@ def code_sample_cc(name):
)

def code_sample_py(name):
native.py_binary(
py_binary(
name = name + "_py3",
srcs = [name + ".py"],
main = name + ".py",
Expand All @@ -57,7 +58,7 @@ def code_sample_py(name):
srcs_version = "PY3",
)

native.py_test(
py_test(
name = name + "_py_test",
size = "small",
srcs = [name + ".py"],
Expand Down

0 comments on commit fd6f278

Please sign in to comment.