-
-
Notifications
You must be signed in to change notification settings - Fork 588
Support src-less invocation of py_binary #2765
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This sounds like a bug. I changed srcs to no longer be mandatory as part of adding the main module attribute so that such a case could work |
Let me double check. |
OK, it works if I pass |
aignas
added a commit
to aignas/rules_python
that referenced
this issue
Apr 10, 2025
With this PR we mark the srcs attribute as optional as we can leverage the `main_module` to just run things from the deps. Fixes bazel-contrib#2765
github-merge-queue bot
pushed a commit
that referenced
this issue
Apr 13, 2025
With this PR we mark the srcs attribute as optional as we can leverage the `main_module` to just run things from the deps. This also removes a long-standing `TODO` note. Fixes #2765 --------- Co-authored-by: Richard Levasseur <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
With the recent addition of the #2671, I find that in most cases I can replace the
py_console_script_binary
with just apy_binary
, e.g:versus
However I cannot do this, because the
srcs
cannot be empty here.An alternative to this could be to use the
python_interpreter
introduced in #2507The text was updated successfully, but these errors were encountered: