add py_binary rule for console_scripts#13
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.
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.
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.