Skip to content

Commit

Permalink
backport linear_solver/samples bazel fix from main
Browse files Browse the repository at this point in the history
  • Loading branch information
Mizux committed Sep 18, 2024
1 parent 1738560 commit d148a3f
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 d148a3f

Please sign in to comment.