0

How to make a py_binary target that accepts interpreter flags such as -OO and -W?

I want the bazel_binary to create an executable that runs python -OO -W main.py.

py_binary(
    name="main",
    srcs=["main.py"],
    ???=["-OO", "-W"],
)

args passes the arguments to main.py. Is there no mechanism for py_binary target to specify interpreter flags?

2

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.