You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Per the README accessing requirements by labels is not supported:
To avoid breakage, please use requirement() instead of depending directly on wheel repo labels.
The requirements also have somewhat unintuitive labels since they prepend pypi__ onto the (sanitized) package name. Not working with labels directly has some consequences:
In the next release it will be hard to work with all_whl_requirements without digging into the requirements workspace, so the abstraction is leaky. (Though uncommon, I find I occasionally need to dig through the requirements workspace in some other settings too.)
It's fairly obfuscated; i.e. it adds an extra layer on top of the normal mechanisms for referring to targets from external workspaces
It doesn't scale well-there used to be requirement, now there's whl_requirement, if you started wrapping console scripts then there would need to be a new function for that, etc. etc.
Describe the solution you'd like
Is it possible to:
Shorten the labels so that it's @<workspace>//<sanitized-package-name> (For the short form of the label.)
Officially support working with the labels directly
Describe alternatives you've considered
We don't enforce that Python deps be sorted. When I need to buildozer a requirement I do some hacky find-replace to stringify it and then unstringify it.
🚀 feature request
Relevant Rules
py_binary,py_library, andpy_testDescription
Per the README accessing requirements by labels is not supported:
The requirements also have somewhat unintuitive labels since they prepend
pypi__onto the (sanitized) package name. Not working with labels directly has some consequences:all_whl_requirementswithout digging into the requirements workspace, so the abstraction is leaky. (Though uncommon, I find I occasionally need to dig through the requirements workspace in some other settings too.)requirement, now there'swhl_requirement, if you started wrapping console scripts then there would need to be a new function for that, etc. etc.Describe the solution you'd like
Is it possible to:
@<workspace>//<sanitized-package-name>(For the short form of the label.)Describe alternatives you've considered
We don't enforce that Python deps be sorted. When I need to buildozer a requirement I do some hacky find-replace to stringify it and then unstringify it.