feat(pypi): pip.defaults API for customizing repo selection 2/n
WIP: stacked on #2987
This is adding constraint_values attribute to pip.configure and is
threading it all the way down to the generation of BUILD.bazel file of for
config settings used in the hub repository.
Out of scope:
- Passing
flag_valuesor target settings. I am torn about it - doing it in this PR would flesh out the design more, but at the same time it might become harder to review. whl_target_platformsandselect_whlsis still unchanged, not sure if it is related to this attribute addition.
Work towards #2747 Work towards #2548 Work towards #260
Haven't looked at code, just saw the PR description.
Passing target settings will be better overall. They're more flexible and easier to customize for users.
I suppose if they can pass a flag setting (the name at least), then it's just as flexible. But if a custom name can be passed, then a custom target_setting should also be passable.
Will do this later, because of how much code I would have to change in one go. Hopefully this can be done in 3/n or 4/n. My plan is to roughly spike out the implementation with almost passing tests, little docs and then tidy up each and every one by one.
EDIT: done in https://github.com/bazel-contrib/rules_python/pull/2990