-
-
Notifications
You must be signed in to change notification settings - Fork 645
Open
Open
Copy link
Labels
Description
Right now there are constants named all_requirements, all_whl_requirements and all_data_requirements that expose:
- all of the
py_librarytargets. - all of the wheels from the hub repo (this are just filegroups).
- all of the
datatargets (these are just filegroups).
Proposal:
Introduce
:whland:datatargets for easy inclusion of all of the whls/packages. The name is up for improvement - should it be@pypi//:all_whl,@pypi//:all_dataor something similar? Maybe plural would be better?:all_pkgpy_librarythat includes all of the otherpy_librarytargets viadepscould be also a good thing to have.- Get rid of the
is_exposedconcept within thepip.parse- all of the requirements will be present in theall_*requirementsconstants no matter what target platforms they are available on. Forgazelleone would have to use the new filegroup. - Introduce a constant with just the names of the distributions that the
pypirepository has so that programatic traversal over all of the targets is still possible. Maybe it should be calleddistributionssomething similar? - Once we have the new targets and constants, we could deprecate the old constants and remove them in
v2.
Pros:
- The inclusion of wheels that are only available on certain platforms becomes easier and there is less logic in our repository rules.
- Maintaining targets is much easier than string constants in the long run.
Cons: - Users may need to introduce aspects or move their logic to build phase instead of using the constant for other use-cases than the
gazellemanifest generation.
What are there other use-cases that we should be mindful of?
- @keith, I remember you had some extra static analysis built on top of
rules_python, is it only using thepy_librarytargets? Are you using any of theall_*requirementsconstants? - @mark-thm, do you have anything using it?
- @alexeagle, do your clients have any custom logic here that is using the symbols?
Related: #260 stabilization requires the whole ticket or at least some of it.