-
Notifications
You must be signed in to change notification settings - Fork 13
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
add py_binary rule for console_scripts #13
base: master
Are you sure you want to change the base?
Conversation
ping @apt-itude would be a nice one to have |
py_binary( | ||
name = "{rule}", | ||
srcs = ["bin/{entry_point}.py"], | ||
deps = [":{library_name}"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we need to provide main = "bin/{entry_point}.py"
here, because in the case when {rule}
has bin-
prepended it won't match automatically.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added. Thank for catching that.
@chaoran not sure if you also ran into the issues but it seems |
@Globegitter Yes, I just tried to run BTW I guess adding a genrule to rename the binary xxx.py file to bin-xxx.py would workaround the issue? I haven't tried it yet. |
@chaoran - the way I got around this is by providing a patch functionality to a forked version of rules_pip. See ecosia@adce162 Yeah hopefully it keeps on improving over the coming weeks/months. Now with the toolchain support there is not much missing anymore from getting it to work nicely in an OSS environment. |
Add py_binary rule if there is console_scripts entry_point defined for the package.