-
Notifications
You must be signed in to change notification settings - Fork 551
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
Introduce targets for all_requirements, all_whl_requirements, all_data_requirements #2559
Comments
… replace requirements Work towards bazelbuild#2559
Created #2560 to illustrate what API I am thinking of. |
Over time we’ve managed to remove most usage — all_requirements acts as a guard in https://github.com/theoremlp/rules_pydeps/tree/main?tab=readme-ov-file#usage so that we can determine whether a call to |
Sorry, |
no all_requirements usage on our side |
Yes I have some clients who needed to patch around rules_python. Also Aspect's rules_py uses |
Thanks for the feedback. I'll make some further prototypes and see how stuff fits together. It is a tricky space to navigate there. I think adding unit tests for all of the promissed and current behaviours is probably the best. Maybe as part of this change we need to do more to ensure that users can get the right metadata in the build context easily. |
Right now there are constants named
all_requirements
,all_whl_requirements
andall_data_requirements
that expose:py_library
targets.data
targets (these are just filegroups).Proposal:
Introduce
:whl
and:data
targets for easy inclusion of all of the whls/packages. The name is up for improvement - should it be@pypi//:all_whl
,@pypi//:all_data
or something similar? Maybe plural would be better?:all_pkg
py_library
that includes all of the otherpy_library
targets viadeps
could be also a good thing to have.is_exposed
concept within thepip.parse
- all of the requirements will be present in theall_*requirements
constants no matter what target platforms they are available on. Forgazelle
one would have to use the new filegroup.pypi
repository has so that programatic traversal over all of the targets is still possible. Maybe it should be calleddistributions
something similar?v2
.Pros:
Cons:
gazelle
manifest generation.What are there other use-cases that we should be mindful of?
rules_python
, is it only using thepy_library
targets? Are you using any of theall_*requirements
constants?Related: #260 stabilization requires the whole ticket or at least some of it.
The text was updated successfully, but these errors were encountered: