rules_python icon indicating copy to clipboard operation
rules_python copied to clipboard

feat(pypi): pip.defaults API for customizing repo selection 2/n

Open aignas opened this issue 6 months ago • 2 comments

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_values or 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_platforms and select_whls is still unchanged, not sure if it is related to this attribute addition.

Work towards #2747 Work towards #2548 Work towards #260

aignas avatar Jun 15 '25 02:06 aignas

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.

rickeylev avatar Jun 15 '25 07:06 rickeylev

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

aignas avatar Jun 15 '25 14:06 aignas